diff options
Diffstat (limited to 'src/main/scala/xyz/driver/core/messaging/Bus.scala')
-rw-r--r-- | src/main/scala/xyz/driver/core/messaging/Bus.scala | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/scala/xyz/driver/core/messaging/Bus.scala b/src/main/scala/xyz/driver/core/messaging/Bus.scala index 599af92..75954f4 100644 --- a/src/main/scala/xyz/driver/core/messaging/Bus.scala +++ b/src/main/scala/xyz/driver/core/messaging/Bus.scala @@ -16,7 +16,7 @@ trait Bus { /** Most general kind of message. Any implementation of a message bus must provide * the fields and methods specified in this trait. */ - trait BasicMessage[A] { + trait BasicMessage[A] { self: Message[A] => /** All messages must have unique IDs so that they can be acknowledged unambiguously. */ def id: MessageId @@ -41,6 +41,9 @@ trait Bus { /** Maximum amount of messages handled in a single retrieval call. */ val defaultMaxMessages = 64 + /** Execution context that is used to query and dispatch messages from this bus. */ + implicit val executionContext: ExecutionContext + /** Retrieve any new messages in the mailbox of a subscription. * * Any retrieved messages become "outstanding" and should not be returned by this function |