I tried to publish a message using solace java dependency to the same topic and it is working with out any issues. But when i start using the SpringBoot JMS it is throwing an Publish ACL denied. I don’t think this is an issue with the User ACL Profile.
By the way this code is working , but we want to move to JMS Client.
public void publish(String textMessage) throws JCSMPException {
final JCSMPSession session = solaceFactory.createSession();
session.connect();
XMLMessageProducer prod = session.getMessageProducer(new JCSMPStreamingPublishEventHandler() {
@Override
public void responseReceived(String messageID) {
logger.info("Producer received response for msg: " + messageID);
}
@Override
public void handleError(String messageID, JCSMPException e, long timestamp) {
logger.info("Producer received error for msg: %s@%s - %s%n", messageID, timestamp, e);
}
});
Topic topic = JCSMPFactory.onlyInstance().createTopic("myTopic");
XMLContentMessage msg = JCSMPFactory.onlyInstance().createMessage(XMLContentMessage.class);
msg.setDeliveryMode(DeliveryMode.PERSISTENT);
msg.setXMLContent(textMessage);
prod.send(msg, topic);
session.closeSession();
}
Please let me know where it is failing.