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

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

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

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

  • MQPER_PERSISTENCE_AS_PARENT(使用本题上方下一题的值)
  • MQPER_NOT_PERSISTENT(不言自明)
  • MQPER_PERSISTENT(不言自明)
  • MQPER_PERSISTENCE_AS_TOPIC_DEF(使用该主题的值,主题的默认值是 ASPARENT,因此它的工作方式类似于 MQPER_PERSISTENCE_AS_PARENT,其中使用默认值)

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

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

queue:///theQueueName?persistence=1


属性 persistence 和所有 URI 属性都记录在 IBM MQ v8 知识中心页面“Creating destinations in a JMS application”。

属性名字:坚持

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