The following QAMessage methods can be used to manage message properties.
You can get and set custom properties, but should only get pre-defined properties.
See QAMessage interface.
See QAMessage class.
See Interface QAMessage.
See Message properties.
// C++ example. QAManagerFactory factory; QAManager * mgr = factory->createQAManager( NULL ); mgr->open(AcknowledgementMode::EXPLICIT_ACKNOWLEDGEMENT); QAMessage * msg = mgr->createTextMessage(); msg->setStringProperty( "tm_Subject", "Some message subject." ); mgr->putMessage( "myqueue", mgr ); |
// C# example. QAManager mgr = QAManagerFactory.Instance.CreateQAManager(null); mgr.Open(AcknowledgementMode.EXPLICIT_ACKNOWLEDGEMENT); QAMessage msg = mgr.CreateTextMessage(); msg.SetStringProperty( "tm_Subject", "Some message subject." ); mgr.PutMessage( "myqueue", msg ); |
// Java example
QAManager mgr = QAManagerFactory.getInstance().createQAManager(null);
mgr.open(AcknowledgementMode.EXPLICIT_ACKNOWLEDGEMENT);
QAMessage msg = mgr.createTextMessage();
msg.setStringProperty("tm_Subject", "Some message subject.");
mgr.putMessage("myqueue", mgr);
|
-- SQL example
begin
DECLARE @msgid VARCHAR(128);
SET @msgid = ml_qa_createmessage();
CALL ml_qa_setfloatproperty( @msgid, 'myfloatproperty1', -1.3e-5 );
CALL ml_qa_setfloatproperty( @msgid, 'myfloatproperty2', 1.3e5 );
CALL ml_qa_putmessage( @msgid, 'clientid\queuename' );
COMMIT;
end |
| Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |