|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
DELIVERY_MODE_NONE as default in XMS 7.5.0.5 |
« View previous topic :: View next topic » |
Author |
Message
|
zbyszanna |
Posted: Wed Apr 13, 2016 8:00 am Post subject: DELIVERY_MODE_NONE as default in XMS 7.5.0.5 |
|
|
Novice
Joined: 03 Feb 2012 Posts: 23
|
Hi,
I have a simple app that creates a bytes message and then prints it's delivery mode.
AFAIR JMS specifies that default delivery mode is DELIVERY_MODE_PERSISTENT
and here it prints DELIVERY_MODE_NONE.
In a real world scenario we use MessageProducer send method which also accepts delivery mode and we take it from the message. We do the same in Java and it works, and here when we send the message, the XMS complains about illegal delivery mode DELIVERY_MODE_NONE. When we use the send method which doesn't bypass the default delivery mode of MessageProducer, everything works fine.
It looks like a bug in XMS. Any comments, suggestions?
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>dspmqver
Name: WebSphere MQ
Version: 7.5.0.5
Level: p750-005-150424
BuildType: IKAP - (Production)
Platform: WebSphere MQ for Windows
Mode: 32-bit
O/S: Windows 7 Professional N x64 Edition, Build 7601: SP1
InstName: Installation1
InstDesc:
Primary: Yes
InstPath: C:\Program Files (x86)\IBM\WebSphere MQ
DataPath: C:\Program Files (x86)\IBM\WebSphere MQ
MaxCmdLevel: 750
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC>dspxmsver
Name: IBM Message Service Client for .NET (XMS .NET)
Version: 2.5.0.5
Level: nn250-005-150112
Build Type: Production
~ $ dspmqver
Name: WebSphere MQ
Version: 7.5.0.5
Level: p750-005-150424
BuildType: IKAP - (Production)
Platform: WebSphere MQ for Linux (x86-64 platform)
Mode: 64-bit
O/S: Linux 3.16.0-38-generic
InstName: Installation1
InstDesc:
Primary: No
InstPath: /opt/mqm
DataPath: /var/mqm
MaxCmdLevel: 750
.Net example:
Code: |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IBM.XMS;
namespace XMSSendTest
{
class Program
{
static void Main(string[] args)
{
IConnectionFactory factory = IBM.XMS.XMSFactoryFactory.GetInstance(XMSC.CT_WMQ).CreateConnectionFactory();
factory.SetStringProperty(XMSC.WMQ_QUEUE_MANAGER, "qmgr);
factory.SetStringProperty(XMSC.WMQ_CHANNEL, "chl");
factory.SetStringProperty(XMSC.WMQ_HOST_NAME, "host");
factory.SetIntProperty(XMSC.WMQ_PORT, 1414);
IConnection connection = factory.CreateConnection();
ISession session = connection.CreateSession(false, AcknowledgeMode.AutoAcknowledge);
IMessage msg = session.CreateBytesMessage();
System.Console.WriteLine("DELIVERY: " + msg.JMSDeliveryMode);
}
}
}
|
prints DELIVERY_MODE_NONE
Java example
Code: |
package XMSSendTest;
import javax.jms.Connection;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.Session;
import com.ibm.msg.client.jms.JmsConnectionFactory;
import com.ibm.msg.client.jms.JmsConstants;
import com.ibm.msg.client.jms.JmsFactoryFactory;
import com.ibm.msg.client.wmq.WMQConstants;
class Program
{
public static void main(String[] args) throws JMSException
{
JmsConnectionFactory factory = (JmsConnectionFactory)JmsFactoryFactory.getInstance(JmsConstants.CT_WMQ).createConnectionFactory();
factory.setStringProperty(WMQConstants.WMQ_QUEUE_MANAGER, "qmgr");
factory.setStringProperty(WMQConstants.WMQ_CHANNEL, "chl");
factory.setStringProperty(WMQConstants.WMQ_HOST_NAME, "host");
factory.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_CLIENT);
factory.setIntProperty(WMQConstants.WMQ_PORT, 1414);
Connection connection = factory.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Message msg = session.createBytesMessage();
System.out.println("DELIVERY: " + msg.getJMSDeliveryMode());
}
}
|
prints 2 (DELIVERY_MODE_PERSISTENT). |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|