Architecting multi queue / multi topic subscriber component

Hey Kov, Thanks for the detailed reply.
So as per your reply I think I misunderstood the documentation for FlowReceiver and it seems like it creates a new receiver without closing the previous one so multi handlers for multi queues should work. Although I havent tested it yet. Should we try using FlowReciever for topic and solcache-topic subscriptions as well ?

Our current code for queue subscriptions:

    Queue queue = JCSMPFactory.onlyInstance().createQueue(queueName);

    ConsumerFlowProperties flowProperties = new ConsumerFlowProperties().setEndpoint(queue);

    flowProperties.setAckMode(JCSMPProperties.SUPPORTED_MESSAGE_ACK_CLIENT);

    FlowReceiver receiver = null;
    flowProperties.setActiveFlowIndication(true);

    try {

        receiver = session.createFlow(myXMLMsgListener, flowProperties, null,
                (Object source, FlowEventArgs event) -> {

                    if (event.getEvent() == FlowEvent.FLOW_ACTIVE) {

                        Log.info(LOG, "Queue = %s Subscribed successfully. ", queueName);

                      

                    } else if (event.getEvent() == FlowEvent.FLOW_INACTIVE) {

                        Log.info(LOG, "Queue = %s Unsubscribed ... this is probably due to a network disconnect. ", queueName);

                    }

                });

        receiver.start();