When sending or receiving messages in JMS, RTDS automatically detects the datatype of the message payload and handles it appropriately as either a byte or text message. When sending messages, JMS recognizes char, varchar, unichar, univarchar, text, and unitext as valid text message types.
Example 1 Sends a text message to the JMS messaging bus:
declare @msg varchar(1024) select @msg = 'abcd' select msgsend(@msg, 'tibco_jms:tcp://my_jms:7222?queue=sample,user=admin')
Example 2 Receives a text message from JMS messaging bus:
select msgrecv('tibco_jms:tcp://my_jms:7222? queue=sample,user=admin', returns varchar(1024))
Example 3 Sends a byte message to JMS messaging bus:
declare @msg varbinary(1024) select @msg = 'abcd' select msgsend(@msg, 'tibco_jms:tcp://my_jms:7222?queue=sample,user=admin')
Example 4 Receives a byte message from JMS messaging bus:
select msgrecv('tibco_jms:tcp://my_jms:7222? queue=sample,user=admin', returns varbinary(1024))