I am trying to send a simple string message from .NET to a Java client using amqp over the service bus. According to the documentation I should be able to send a brokered message like this:
message = new BrokeredMessage("this is a text string");
and have it show up in the Java client as a TextMessage (javax.jms.TextMessage). However when I try and cast the message in Java as a TextMessage I get an exception saying it cant convert a jms.impl.BytesMessageImpl to a TextMessage. Anyone know why the message looks like a BytesMessage rather than a TextMessage?
According to the docs a BytesMessage would be built like this:
byte[] bytes = { 33, 12, 45, 33, 12, 45, 33, 12, 45, 33, 12, 45 };
message = new BrokeredMessage(bytes);
which I am not doing....
Thanks!