@marc I had gone through this document, I know how errorqueue and DMQ is different and what is used for now the challenge is reprocessing.
-
I can add a listener to my error queue and subscribe and reprocess the message but as per our project existing code they are making use of kafkaTemplate, RabbitMqTemplate to siphon message from the queue, even proving number of message
and even for solace i did something long back using jms & jndi Template but i am not sure how to do the same thing with spring cloud stream. I need to consume message whenever we want not using a listener. approach could be to siphon a number of message from the queue , save to data base, and then from the UI view the message and also reprocess which could dropping to same queue back or some other way depending on the status of message may be. -
And same question for DMQ message reprocessing,
I need your help about reproccessing of the message how to do the same thing with spring cloud stream and solace like we do using Jms and JndiTemplate. see the below code i used a year back for jms,InitialContext initialContext = null; SolSession session = null; List<DeadLetterMessage> deadLetterMessages = new ArrayList<>(); try { session = (SolSession) solConnection.createSession(true, 0); session.start(); initialContext = (InitialContext) jndiTemplate.getContext(); Queue dlqQueue = (Queue) initialContext.lookup(dlq); MessageConsumer consumer = session.createConsumer(dlqQueue); for (int i = 0; i < numOfMessage; i++) { try { TextMessage textMessage = (TextMessage) consumer.receive(1000); DeadLetterMessage deadLetterMessage = objectMapper.readValue(textMessage.getText(), DeadLetterMessage.class); deadLetterMessage.setRecoveryStatus(RecoveryStatus.SIPHONED); deadLetterMessages.add(deadLetterMessage); } catch (Exception e) { log.error("Failed Parsing Message " + e.getMessage()); } }