PublishJMS 处理器在将 json 消息发布到 IBM Websphere MQ 时失败 [英] PublishJMS processor fails while publishing json message to IBM Websphere MQ

查看:20
本文介绍了PublishJMS 处理器在将 json 消息发布到 IBM Websphere MQ 时失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在从 NIFI 的 PublishJMS 处理器中推送 json 消息时遇到问题.

注意:只是添加尝试过的各种处理器以查看是否可以修改属性,但没有任何帮助,我能够弄清楚问题只是因为我使用的是 ConsumeJMS &在同一流程中一起发布 JMS.

要发布的 JSON 消息:

{"dataprepcomplete":{"modelfamilytype":"property","groupid":"1","claims":[{"requestid":"1","claimid":"10001"},{"requestid":"2","claimid":"10002"}]}}

JMSCC0051: THE PROPERTY 'JMS_IBM_REPORT_PASS_CORREL_ID' SHOULD SET USING TYPE 'JAVA.LANG.INTEGER', NOT 'JAVA.LANG.STRING'"的问题已根据我之前发布的解决方案

ReplaceText 属性

PublishJMS 属性

PublishJMS 处理器的数据来源

解决方案

谢谢@andrew,你说得对.但我想提供我所做的确切修复,以使其正常工作并克服 IBM Websphere MQ jars v7.5 及更低版本的问题.

我必须确保使用 UpdateAttribute 处理器从 Apache Nifi 的 Flowfile 中删除以下提到的属性.

JMS_IBM_MsgType、JMS_IBM_Encoding &JMS_IBM_PutApplType

并且还通过添加具有相同名称的附加属性来替换 Flowfile 中与整数相同的属性.

附件是使其工作的 UpdateAttribute 处理器的屏幕截图.

希望它有所帮助,因为在使用 Apache NIFI 修复实际问题之前,它是一种变通方法.

I am facing an issue in PublishJMS processor of NIFI while pushing the json message from it.

Note: Just to add tried various processors to see if the attributes can be modified, but none helped, I am able to figure out the issue is only because I am using ConsumeJMS & PublishJMS together in the same flow.

JSON Message to be published:

{"dataprepcomplete":{"modelfamilytype":"property","groupid":"1","claims":[{"requestid":"1","claimid":"10001"},{"requestid":"2","claimid":"10002"}]}}

The issue of the "JMSCC0051: THE PROPERTY 'JMS_IBM_REPORT_PASS_CORREL_ID' SHOULD SET USING TYPE 'JAVA.LANG.INTEGER', NOT 'JAVA.LANG.STRING'" is resolved as per the solution posted in my earlier post and I am able to publish json messages to my MQ Queue from the below flow.

QueryDatabaseTable > ConvertAvroToJSON > PublishJMS

But I am getting the same error as reported in the earlier post from the PublishJMS processor when I am using the PublishJMS is the below mentioned flow.

ConsumeJMS > ReplaceText > PublishJMS

Am I missing anything?

Do I have to plug some other processor before the PublishJMS to be able to publish the message successfully.?

Any help on this will be highly appreciated.

Below are properties for the procesors.

ConsumeJMS properties:

ReplaceText properties

PublishJMS properties

DataProvenance of PublishJMS processor

解决方案

Thanks @andrew you are correct. But I would like to put the exact fix I did to make it working and to overcome the issue of IBM Websphere MQ jars v7.5 and below.

I had to make sure I delete the below mentioned attributes from the Flowfile of Apache Nifi using the UpdateAttribute processor.

JMS_IBM_MsgType, JMS_IBM_Encoding & JMS_IBM_PutApplType

And also to substitute the same attributes as integer in the Flowfile by adding the additional attributes with same name.

Attached are the screenshot of the UpdateAttribute processors which made it working.

Hope it helps as it is a work around till the actual issue is fixed with Apache NIFI.

这篇关于PublishJMS 处理器在将 json 消息发布到 IBM Websphere MQ 时失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆