Two or more consumers for different topics

murillocg
murillocg Member Posts: 11
edited October 2022 in PubSub+ Event Broker #1

Here in this question, I managed to solve the queue issue: Two or more consumers for different queues

Now, the following question remains:

In the same application, I need to process non-persistent messages, which are sent to different topics and have different formats: 1) update-certificate; 2) update-credentials;

In this case, I should also use the FlowReceiver and create two objects, but using a Topic instead of a Queue in consumerFlowProperties.setEndpoint()? Or create one XMLMessageListener and create some logic to split two different messaging processors?

Tagged:

Answers

  • TomF
    TomF Member, Employee Posts: 406 Solace Employee

    Hi @murillocg,

    Queues are generally for receiving persistent messages. If you need to receive direct/non-persistent messages, create a subscription to each of the topics you want. The non-persistent messages will then be received on your session callback. You need to interrogate the topic the message was received on to work out whether it's an update-certificate or update-credentials.