Uploaded image for project: 'ActiveMQ .Net'
  1. ActiveMQ .Net
  2. AMQNET-226

?consumer.prefetchSize=X overrides message consumer in pull mode

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 1.2.0
    • 1.2.0
    • NMS
    • None
    • ActiveMQ 5.2

    Description

      Not sure if this is a bug or more of misconfiguration between broker and NMS. But if I set the prefetch policy queue prefetch to zero:

      ((Connection)_listenerConnection2).PrefetchPolicy = new PrefetchPolicy()

      { QueuePrefetch = 0 }

      ;

      and configure my destination to prefetch 5:

      IDestination destination2 = new ActiveMQQueue(_queue + "?consumer.prefetchSize=5");

      When _listenerConnection2 pulls it prefetches five messages. Should the prefetch config on the destination be ignored?

      I've attached a test. Run a producer and consumer at the same time sending 20 messages. This will actually run two consumers (one prefetch mode and the other pull mode).

      Attachments

        1. NativeNMSConsumerAndProducer.zip
          8.09 MB
          Mark Gellings

        Activity

          People

            jgomes Jim Gomes
            magellings Mark Gellings
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: