Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The virtual topics feature is very simple and quite powerful once you understand it.</p> <ol> <li><p>When using virtual topics - there is no need for durable consumers. That is because for each client you will get an instance of regular queue created. If you have 5 clients (application A, B, C, D, E) you will get 5 queues created and populated with the copy of the messages every time message is sent to the virtual topic.</p></li> <li><p>Actually it is a limitation of durable consumer - that only ONE connection is allowed per clientId. Being a regular queue, you can create as many consumers as you like and queue will guarantee that 1 message will be received only by 1 consumer. So if you have application A that takes 1 minute to process a message, you can create 5 instances of it listening to the same queue. When you will post 5 messages within 1 second, each of your application will receive its own message to process.</p></li> <li><p>There are not well documented requirements which are not intuitive. To make virtual topic work you need</p> <ul> <li>Use <code>VirtualTopic.</code> in your topic name, for example <code>VirtualTopic.Orders</code> (this prefix can be configured)</li> <li>Use <code>Consumer.</code> in the name of the queue you. Like <code>Consumer.ApplicationA.VirtualTopic.Orders</code> where <strong>ApplicationA</strong> is actually your client id</li> <li>Use regular subscribers not durable ones for the queue above.</li> </ul></li> </ol> <p>Example:</p> <pre><code>string activeMqConsumerTopic = "Consumer.AmqTestConsumer.VirtualTopic.Orders"; IQueue queue = SessionUtil.GetQueue(session, activeMqConsumerTopic); IMessageConsumer consumer = session.CreateConsumer(queue); </code></pre> <p>Queue is created for automatically whenever the first instance of consumer is subscribed to it. Since that moment all messages that are sent to topic are duplicated/copied into all associated queues.</p> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload