LibraryToggle FramesPrintFeedback

Concurrent store and dispatch is enabled by default for queues.

If you want to enable concurrent store and dispatch for topics, you must set the concurrentStoreAndDispatchTopics property to true.

[Note]Note

In versions of Fuse Message Broker prior to 5.4.0, it was possible to enable concurrent store and dispatch for transactions as well, but this option is no longer supported. Transaction are now always executed serially.

Figure 2.2 shows an outline what happens in the broker when concurrent store and dispatch is enabled and the attached consumers are relatively slow to acknowledge messages.


In the slow consumer case, concurrent store and dispatch behaves as follows:

  1. The producer sends a message, M, to a destination on the broker.

  2. The broker sends the message, M, to the persistence layer. Because concurrency is enabled, the message is initially held in a task queue, which is serviced by a pool of threads that are responsible for writing to the journal.

  3. Storing and dispatching are now performed concurrently. The message is dispatched either to one consumer (queue destination) or possibly to multiple destinations (topic consumer). In the meantime, because the attached consumers are slow, we can be sure that the thread pool has already pulled the message off the task queue and written it to the journal.

  4. The consumer (or consumers, as the case may be) acknowledge receipt of the message.

  5. The broker asks the persistence layer to remove the message from persistent storage, because delivery is now complete.

    [Note]Note

    In practice, because the KahaDB persistence layer is not able to remove the message from the rolling log files, KahaDB simply logs the fact that delivery of this message is complete. (At some point in the future, when all of the messages in the log file are marked as complete, the entire log file will be deleted.)

Comments powered by Disqus