Is there a way to change the Delivery Mode in PublishJMS processor in Nifi?

烂漫一生 提交于 2019-12-12 16:34:17

问题


​I am sending messages to IBM MQ using Nifi PublishJMS processor. The Messages have Persistence = Persistent in MQ. I want to change it to Non-Persistent. Is there a property in Nifi PublishJms processor to correct this? Or is it done from the MQ side. I don't have access to MQ servers, I can only check the messages being delivered to the queue.


回答1:


At a low level a MQ client applications can specify the following persistence values:

  • MQPER_PERSISTENCE_AS_PARENT (Use the value of the next topic above this one)
  • MQPER_NOT_PERSISTENT (self-explanatory)
  • MQPER_PERSISTENT (self-explanatory)
  • MQPER_PERSISTENCE_AS_TOPIC_DEF (Use the value of this topic, the default on a topic is ASPARENT so this works like MQPER_PERSISTENCE_AS_PARENT where defaults are in use)

If nothing is specified then MQPER_PERSISTENCE_AS_TOPIC_DEF is the default.

Within the JMS API you can override this using a URI property as follows:

queue:///theQueueName?persistence=1


Property persistence and all URI properties are documented in the IBM MQ v8 Knowledge center page "Creating destinations in a JMS application".

Property name: persistence

  • -2 - As specified on the send() call or, if not specified on the send() call, the default persistence of the message producer.
  • -1 - As specified by the DefPersistence attribute of the IBM MQ queue or topic.
  • 1 - Nonpersistent.
  • 2 - Persistent.
  • 3 - Equivalent to the value HIGH for the PERSISTENCE property as used in the IBM MQ JMS administration tool. For an explanation of this value, see JMS persistent messages.


来源:https://stackoverflow.com/questions/50333116/is-there-a-way-to-change-the-delivery-mode-in-publishjms-processor-in-nifi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!