I'm using 2.4.0 and am attempting to create a Subscriber and Publisher from within the same process.
For a test.. they just register with the same Topic using different Sessions. I set up the Subscriber first calling connection.start() afterward .. then setup and publish 2 ObjectMessages. What I'm seeing is 2 attempts to publish: the first attempt apparently fails, but the subscriber responds at the second publish .. (only it receives the first message at that time - the second message is never seen).
I know the setup sounds strange but I can see no reason why it shouldn't work. Perhaps you can!
Just an update... Figured out the problem.. My test shutdown too quickly to receive the last message. Adding a delay sorted it. Cheers.