package core

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. core
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package impl
  2. package javadsl

Type Members

  1. case class DefaultMessageReceiveResult[F[_], M](message: F[M], attributes: Map[String, String], consumer: Option[MessageConsumer[F, _ >: M]], commit: F[Unit], rollback: F[Unit], underlyingMessageProvided: F[Any], underlyingContextProvided: F[Any]) extends MessageReceiveResult[F, M] with Product with Serializable
  2. trait MessageConsumer[F[_], M] extends AnyRef

    The usual semantics of a consumer is that each message is delivered to exactly one receive or subscription.

    The usual semantics of a consumer is that each message is delivered to exactly one receive or subscription. Therefore, multiple subscriptions on a consumer receive messages randomly. If messages need to be delivered multiple times, each receiver should have a separate consumer.

  3. trait MessageContext[F[_]] extends AnyRef
  4. implicit class MessageExtension[F[_], M] extends AnyRef
  5. trait MessageHandler[F[_], M] extends AnyRef
  6. trait MessageProducer[F[_], M] extends AnyRef
  7. trait MessageReceiveResult[F[_], M] extends AnyRef
  8. trait MessageSendResult[F[_], M] extends AnyRef
  9. trait MessageSubscription[F[_], M] extends AnyRef
  10. case class ReceiveTimeout(timeout: Option[Duration], cause: Throwable) extends IllegalStateException with Product with Serializable
  11. trait ReceiverClient[F[_], M] extends AnyRef
  12. trait Request[RESPONSE] extends AnyRef

    Request[RESPONSE] cannot be covariant.

    Request[RESPONSE] cannot be covariant. This is easy to see because to enforce the response type, reply(...) must have an argument type of RESPONSE which would be impossible with a covariant type parameter (if it was covariant, it would be possible to assign a Request[SUBTYPE1] to a Request[SUPERTYPE] and then call reply with a SUBTYPE2 as the response, which would break type safety). The consequence of the invariance is that:

    1) reply(...) is type safe, which is good; 2) It is not possible to declare RequestResponseClient as RequestResponseClient[REQ <: Request[RESP], RESP] because that would assume covariance; 3) It is not possible to use something like Request[MyResponseType] as the common supertype for requests because that would assume covariance again - the solution is to use another supertype - e.g. declare a separate sealed trait MyRequestType to enforce type safety on the client and the consumers / producers - this is not a huge constraint though.

    This is all the consequence of the requirement to enforce type safety on the response for each request and also the fact that we want a common reply(...) method declared in the Request trait. The other option would be the Akka typed route, which is basically making a reply sender reference part of the request message. The downside of that is:

    1) A sender reference needs to be declared explicitly in every request message, making it part of the model; 2) The ask syntax is complicated and unintuitive - see https://doc.akka.io/docs/akka/current/typed/interaction-patterns.html#request-response; 3) Requires the existence of sender references with marshalling - this is fine in Akka where serializable references are assumed to be used everywhere, but it is quite intrusive if the application model is forced to have these references everywhere. I think extending the trait is less intrusive and less verbose.

    Of course, the choice of adding Request[RESPONSE] does not preclude the addition of an Akka-style API at some point if extending the trait will ever become a constraint.

  13. trait RequestContext[F[_]] extends AnyRef
  14. implicit class RequestExtension[F[_], REQUEST] extends AnyRef
  15. trait RequestHandler[F[_], REQ, RESP] extends AnyRef
  16. trait RequestResponseClient[F[_], REQ, RESP] extends AnyRef
  17. trait RequestResponseMapping[REQUEST, RESPONSE] extends AnyRef

    Type class to bind a request message type to a response type.

    Type class to bind a request message type to a response type. It makes request-response mapping pluggable, without enforcing any kind of convention on the implementor.

    Annotations
    @implicitNotFound()
  18. trait RequestResponseResult[F[_], REQUEST, RESPONSE] extends AnyRef
  19. case class RequestTimeout(timeout: Duration, cause: Throwable) extends IllegalStateException with Product with Serializable
  20. case class SendMessageContext(attributes: Map[String, String] = Map()) extends Product with Serializable
  21. case class SendRequestContext(requestTimeout: Option[Duration] = None, attributes: Map[String, String] = Map()) extends Product with Serializable
  22. trait SendResponseResult[+RESP] extends AnyRef
  23. trait SenderClient[F[_], REQ] extends AnyRef
  24. trait Service[F[_]] extends AnyRef
  25. trait ServiceConfiguration extends AnyRef

    Configuration for a service.

    Configuration for a service. The service config can be used to create or deploy a service or to create a client for it. A service configuration can be shared between the server and client side.

  26. trait ServiceState[F[_]] extends AnyRef
  27. case class UnknownRequest[REQ](request: REQ) extends IllegalStateException with Product with Serializable
  28. implicit class requestResponseClientExtension[F[_], REQ, RESP] extends AnyRef
  29. implicit class requestTagBasedRequestResponseClientExtension[F[_], REQ, RESP] extends AnyRef

Value Members

  1. val CorrelationIdKey: String
  2. val RequestTimeoutKey: String
  3. val ResponseProducerIdKey: String
  4. val ResponseTopicKey: String
  5. implicit def requestResultToResponse[F[_], REQUEST, RESPONSE](requestResult: RequestResponseResult[F, REQUEST, RESPONSE]): F[RESPONSE]
  6. implicit def requestTagBasedRequestResponseMapping[REQUEST <: Request[_ <: RESPONSE], RESPONSE]: RequestResponseMapping[REQUEST, RESPONSE]
  7. implicit def sendRequest[F[_], REQUEST, RESPONSE](request: REQUEST)(implicit requestResponseMapping: RequestResponseMapping[REQUEST, RESPONSE], client: RequestResponseClient[F, _ >: REQUEST, _ >: RESPONSE], sendRequestContext: SendRequestContext = SendRequestContext(), M: Monad[F]): F[RESPONSE]
  8. object MessageHandler
  9. object ReceiveTimeout extends Serializable
  10. object RequestHandler
  11. object RequestTimeout extends Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped