有没有办法在Nifi中的PublishJMS处理器中更改传递模式?

有没有办法在Nifi中的PublishJMS处理器中更改传递模式?

问题描述:

我正在使用Nifi PublishJMS处理器向IBM MQ发送消息.消息在MQ中具有Persistence = Persistent.我想将其更改为非持久". Nifi PublishJms处理器中是否有属性可以更正此问题?还是从MQ方面完成的.我无权访问MQ服务器,只能检查正在传递到队列的消息.

​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.

在低级别,MQ客户端应用程序可以指定以下持久性值:

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

  • MQPER_PERSISTENCE_AS_PARENT(使用该主题上方的下一个主题的值)
  • MQPER_NOT_PERSISTENT(不言自明)
  • MQPER_PERSISTENT(不言自明)
  • MQPER_PERSISTENCE_AS_TOPIC_DEF(使用此主题的值,该主题的默认值为ASPARENT,因此它与MQPER_PERSISTENCE_AS_PARENT的工作方式相同,其中使用了默认值)
  • 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)

如果未指定任何内容,则默认为MQPER_PERSISTENCE_AS_TOPIC_DEF.

If nothing is specified then MQPER_PERSISTENCE_AS_TOPIC_DEF is the default.

在JMS API中,您可以使用URI属性覆盖此属性,如下所示:

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

queue:///theQueueName?persistence=1

属性persistence和所有URI属性记录在IBM MQ v8知识中心页面"

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

属性名称:持久性

  • -2-在send()调用中指定,或者,如果未在send()调用上指定,则为消息生成器的默认持久性.
  • -1-由IBM MQ队列或主题的DefPersistence属性指定.
  • 1-非持久性.
  • 2-持久.
  • 3-等效于IBM MQ JMS管理工具中使用的PERSISTENCE属性的值HIGH.对于这个的解释 值,请参见
  • -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.