Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8338987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:45:37+00:00 2026-06-09T04:45:37+00:00

I’m trying to consume JMS messages send over WebSphere MQ (WebSphere MQ Server v7)

  • 0

I’m trying to consume JMS messages send over WebSphere MQ (WebSphere MQ Server v7) by .NET application using .NET WMQ API. I’m using WebSphere MQ Client v7.5 and amqmdnet.dll version 7.5.0.0.

There is some very strange behavior when reading JMSDeliveryMode property (Dlv property from jms RFH2 folder). The property value send by JMS application (servlet hosted in WebSphere Application Server v7) is set to Persistent (2) but my .NET client always reads 1 (which means Non_persistent). I need to read the correct value because my .NET application works as router/forwarder and it must forward message with correct configuration.

I tried to simulate JMS messages using RFHUtils. When I set delivery mode to 1 and send it to my .NET client it again reads 1 but if I also change persistence of MQ message in MQMD it reads 0. It looks like the value in JMSDeliveryMode is not used at all and .NET client always reads value from Persistence property but it is incorrect behavior! These two properties have different ranges of correct values:

JMSDeliveryMode correct values (from jms.jar):

  • 1 – DeliveryMode.NON_PERSISTENT
  • 2 – DeliveryMode.PERSISTENT

Persistence correct values (from amqmdnet.dll):

  • 0 – MQC.MQPER_NOT_PERSISTENT
  • 1 – MQC.MQPER_PERSISTENT
  • 2 – MQC.MQPER_PERSISTENCE_AS_Q_DEF / MQC.MQPER_PERSISTENCE_AS_TOPIC_DEF
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:45:39+00:00Added an answer on June 9, 2026 at 4:45 am

    It is again bug in IBM’s amqmdnet.dll. After disassembling the library with .NET Reflector and checking the code responsible for reading JMS properties (GetJmsProperty private method of MQMessage class) I found this:

    if (name.Equals("JMSDeliveryMode"))
    {
       // Properties never contain the property with such name!
       if (this.properties.ContainsKey("JMSDeliveryMode"))
       {
          ...
       }
       return this.Persistence;  // Executes always
    }
    

    The problem is that properties collection never contains any property with JMSDeliveryMode as a key. properties collection contains RFH2 headers in format RFH2Folder.RFH2PropertyName. The correct property name for JMSDeliveryMode is jms.Dlv! Interestingly GetJmsHeader method reads all JMS properties and all other properties use correct RFH2 name when searching in properties collection!

    The situation was even worse when I checked the reverse operation – private method SetJmsProperty from MQMessage class. Setting JMSDeliveryMode contains this code:

    else if (name.Equals("JMSDeliveryMode"))
    {
        if (value is int)
        {
            int num2 = Convert.ToInt32(value);
            switch (num2)
            {
                // Non persistent JMS message creates persistent MQ message  
                case 1:
                    this.Persistence = 1;
                    break;
                // Invalid value for JMS delivery mode            
                case 0:
                    this.Persistence = 0;
                    break;
                // Great if I try to create persistent JMS message I will 
                // get MQRC_PERSISTENCE_ERROR exception!            
                default:
                    base.throwNewMQException(2, 0x7ff);
                    break;
            }
    
            queue.Enqueue(num2);
            // Correct RFH2 identifier is used
            this.properties.Add("jms.Dlv", queue);
        }
        else
        {
            base.throwNewMQException(2, 0x9a9);
        }
    }
    

    So setting JMSDelivery mode will either fire exception or set invalid persistence! Here is small test for reproducing the problem:

    [Test]
    public void PutAndGetMessageWithDeliveryMode() {
        using (MQQueue queue = _queueManager.AccessQueue(TestQueue, MQC.MQOO_OUTPUT | MQC.MQOO_INPUT_AS_Q_DEF)) {
    
            MQMessage message = new MQMessage();
            message.SetInt4Property("JMSDeliveryMode", 2);
            message.WriteString("some string");
            message.Format = MQC.MQFMT_STRING;
    
            queue.Put(message); 
    
            MQMessage readMessage = new MQMessage();
            queue.Get(readMessage); 
    
            Assert.AreEqual(2, readMessage.GetInt4Property("JMSDeliveryMode"));
    
            queue.Close();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.