Last two days I’ve spent hacking Swing code. I decided to run standalone producer application to show real interaction with broker. You may treat this Swing app like entry point for people to our middleware system. Users simply do “transfers” from this application and don’t know anything about technical details. I added text area to main window to show structure of message sent to broker.
Producing messages with JMS Most of communication systems, whanever you will go have two different kinds of values, first - main and mainly used is body, second is typical metadata named headers or properties or parameters. JMS is not different, you can create different kinds of messages and set headers to them (in JMS world they’re named property, but I preffer header). Let check messaging code we have: [java highlight=“20,22,24,28-31”] // import declarations … public class JmsMessageSender implements MessageSender, InitializingBean {
...