首页 \ 问答 \ Jms Gateway无法刷新MQ连接(Jms Gateway Unable to refresh MQ connection)

Jms Gateway无法刷新MQ连接(Jms Gateway Unable to refresh MQ connection)

我有一个入站网关,它正在监听MQ的消息。 每当MQ服务器被买下时。 我松开连接,在日志中,我看到我的入站网关每隔5秒尝试刷新一次连接。 但是一旦MQ服务器启动,我仍然会在日志中看到相同的错误。 如果我错过了配置中的任何信息,或者在MQ服务器上有什么要做的,请告诉我。

Spring Config

<bean id="cachingConnectionFactory1" class="org.springframework.jms.connection.CachingConnectionFactory"> 
    <property name="targetConnectionFactory" ref="mqConnectionFactory1"/> 
    <property name="reconnectOnException" value="true"/>
</bean>

<bean id="mqConnectionFactory1" class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter"> 
    <property name="targetConnectionFactory"> 
        <bean class="com.ibm.mq.jms.MQQueueConnectionFactory"> 
            <property name="hostName" value="${mq.hostname.1}"/> 
            <property name="port" value="${mq.port}"/> 
            <property name="queueManager" value="${mq.queuemanager.1}"/> 
            <property name="transportType" value="${mq.transporttype}"/>
            <property name="channel" value="${mq.channel}"/>
        </bean> 
    </property> 
    <property name="username" value="${mq.username}"/>
</bean>

<int-jms:message-driven-channel-adapter 
        id="mqEnterpriseRequestAdapter1" 
        connection-factory="cachingConnectionFactory1" 
        destination="xyzQueue"
        concurrent-consumers="2"
        max-concurrent-consumers="5"
        cache-level="5" 
        idle-consumer-limit="5"
        max-messages-per-task="2"
        channel="xyzReceive"/>

错误日志:

[2015-09-19 01:52:56,267]  WARN [org.springframework.jms.listener.DefaultMessageListenerContainer#4-494492] (DefaultMessageListenerContainer.java:842) - Setup of JMS message listener invoker failed for destination 'queue:///queuename' - trying to recover. Cause: MQJMS2002: failed to get message from MQ queue; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
[2015-09-19 01:52:51,292]  WARN [org.springframework.jms.listener.DefaultMessageListenerContainer#4-494037] (DefaultMessageListenerContainer.java:842) - Setup of JMS message listener invoker failed for destination 'queue:///queuename' - trying to recover. Cause: MQJMS2002: failed to get message from MQ queue; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
[2015-09-19 01:52:51,263]  WARN [org.springframework.jms.listener.DefaultMessageListenerContainer#4-494488] (DefaultMessageListenerContainer.java:842) - Setup of JMS message listener invoker failed for destination 'queue:///queuename' - trying to recover. Cause: MQJMS2002: failed to get message from MQ queue; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
[2015-09-19 01:52:46,291]  WARN [org.springframework.jms.listener.DefaultMessageListenerContainer#4-494033] (DefaultMessageListenerContainer.java:842) - Setup of JMS message listener invoker failed for destination 'queue:///queuename' - trying to recover. Cause: MQJMS2002: failed to get message from MQ queue; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
[2015-09-19 01:52:46,262]  WARN [org.springframework.jms.listener.DefaultMessageListenerContainer#4-494485] (DefaultMessageListenerContainer.java:842) - Setup of JMS message listener invoker failed for destination 'queue:///queuename' - trying to recover. Cause: MQJMS2002: failed to get message from MQ queue; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019

I have an inbound gateway which is listening to MQ for messages. Whenever the MQ server is bought down. I loose the connection and in the logs I see that my inbound gateway tries to refresh the connection every 5 seconds. But once the MQ server is up I still see the same error in the log. Can you please let me know if I'm missing any info from the config or is there anything to be done on the MQ server.

Spring Config

<bean id="cachingConnectionFactory1" class="org.springframework.jms.connection.CachingConnectionFactory"> 
    <property name="targetConnectionFactory" ref="mqConnectionFactory1"/> 
    <property name="reconnectOnException" value="true"/>
</bean>

<bean id="mqConnectionFactory1" class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter"> 
    <property name="targetConnectionFactory"> 
        <bean class="com.ibm.mq.jms.MQQueueConnectionFactory"> 
            <property name="hostName" value="${mq.hostname.1}"/> 
            <property name="port" value="${mq.port}"/> 
            <property name="queueManager" value="${mq.queuemanager.1}"/> 
            <property name="transportType" value="${mq.transporttype}"/>
            <property name="channel" value="${mq.channel}"/>
        </bean> 
    </property> 
    <property name="username" value="${mq.username}"/>
</bean>

<int-jms:message-driven-channel-adapter 
        id="mqEnterpriseRequestAdapter1" 
        connection-factory="cachingConnectionFactory1" 
        destination="xyzQueue"
        concurrent-consumers="2"
        max-concurrent-consumers="5"
        cache-level="5" 
        idle-consumer-limit="5"
        max-messages-per-task="2"
        channel="xyzReceive"/>

Error Log:

[2015-09-19 01:52:56,267]  WARN [org.springframework.jms.listener.DefaultMessageListenerContainer#4-494492] (DefaultMessageListenerContainer.java:842) - Setup of JMS message listener invoker failed for destination 'queue:///queuename' - trying to recover. Cause: MQJMS2002: failed to get message from MQ queue; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
[2015-09-19 01:52:51,292]  WARN [org.springframework.jms.listener.DefaultMessageListenerContainer#4-494037] (DefaultMessageListenerContainer.java:842) - Setup of JMS message listener invoker failed for destination 'queue:///queuename' - trying to recover. Cause: MQJMS2002: failed to get message from MQ queue; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
[2015-09-19 01:52:51,263]  WARN [org.springframework.jms.listener.DefaultMessageListenerContainer#4-494488] (DefaultMessageListenerContainer.java:842) - Setup of JMS message listener invoker failed for destination 'queue:///queuename' - trying to recover. Cause: MQJMS2002: failed to get message from MQ queue; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
[2015-09-19 01:52:46,291]  WARN [org.springframework.jms.listener.DefaultMessageListenerContainer#4-494033] (DefaultMessageListenerContainer.java:842) - Setup of JMS message listener invoker failed for destination 'queue:///queuename' - trying to recover. Cause: MQJMS2002: failed to get message from MQ queue; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019
[2015-09-19 01:52:46,262]  WARN [org.springframework.jms.listener.DefaultMessageListenerContainer#4-494485] (DefaultMessageListenerContainer.java:842) - Setup of JMS message listener invoker failed for destination 'queue:///queuename' - trying to recover. Cause: MQJMS2002: failed to get message from MQ queue; nested exception is com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2019

原文:https://stackoverflow.com/questions/32706320
更新时间:2022-09-16 18:09

最满意答案

你想要的是Adobe提出的CSS Regions模块,目前支持零浏览器。 如果你真的感兴趣的话,Adobe确实会发布一个非常粗糙的基于webkit的浏览器来玩这个规范。 但正如其他人所说,现在你是SOL,需要找到另一种解决方案。


What you want is CSS Regions module proposed by Adobe and currently supported by zero browsers. Adobe did release a very rough webkit-based browser for playing with the spec if you're really interested. But as others have said, right now you're SOL and will need to find another solution.

相关问答

更多
  • scrollHeight应该是内容的总高度。 scrollTop指定要显示在元素客户区顶部的内容的像素偏移量。 所以你真的想要(仍然使用jQuery): $("#thediv").each( function() { // certain browsers have a bug such that scrollHeight is too small // when content does not fill the client area of the element var scrol ...
  • $innerListItem.position().top实际上是相对于其第一个定位的祖先的.scrollTop() 。 所以计算正确的$parentDiv.scrollTop()值的方法是首先确保$parentDiv被定位。 如果它还没有明确的position ,请使用position: relative 。 元素$innerListItem及其所有祖先直到$parentDiv需要没有明确的位置。 现在您可以滚动到$innerListItem : // Scroll to the top $parentD ...
  • 我不知道有哪种方式可以通过编程方式进行,我很难找到一个用例,从UX的角度来看这是一个好主意,但是Android设计文档已经更新了一个指南,指出将有多少图标显示给定的设备大小。 I don't know of a way to do it programmatically, and I struggle to find a use case where this would be a good idea from a UX standpoint, but the Android Design docs hav ...
  • 根据你的代码,你需要在click事件之前定义变量,但是为了实现@Undefitied的答案是最好的选择。 var var1 = $(".Page1").offset().top; var var2 = $(".Page2").offset().top; var var3 = $(".Page3").offset().top; $(".Link1").click(function() { $('.Box').animate({ scrollTop: var1}, 's ...
  • 自Mango SDK以来,有一个属性调用TextTrimming 。 所以这个xaml 会产生像“aaaaaaa ......”这样的东西 因此,对于您的代码,您只需执行以下操作: Tb1.TextWrapping=TextWrapping.WordEllipsis 编辑有一个名为Wrap的属性,您可以在xaml和c#中设置 ...
  • 来自http://bytes.com/topic/javascript/answers/157924-detect-if-scrollbars-visible-inside-div : if (document.getElementById('divID').scrollHeight > document.getElementById('divID').clientHeight) { //a vertical scroll bar is present } else { //a vertical scrol ...
  • jQuery .text方法只返回纯文本。 请尝试使用.html 。 例: var text = currentCol.html(); 但是,如果您的标记包含任何空格(例如 ),那么代码中的以下行将会对您的文本造成混乱 var wordArray=text.split(' '); 您可能想要将其更改为 text = text.replace(/ (?![^<>]*>)/gi, '%^%'); var wordArray = text.split('%^% ...
  • 你想要的是Adobe提出的CSS Regions模块,目前支持零浏览器。 如果你真的感兴趣的话,Adobe确实会发布一个非常粗糙的基于webkit的浏览器来玩这个规范。 但正如其他人所说,现在你是SOL,需要找到另一种解决方案。 http://www.adobe.com/devnet/html5/articles/css3-regions.html http://labs.adobe.com/technologies/cssregions/ http://dev.w3.org/csswg/css3-regi ...
  • 终于找到了办法做到这一点。 您可以使用jQuery设置html / body scrollTop。 例: $(window).load(function() { var yValue = 1000; $("html, body").scrollTop(yValue); } Finally found a way to do this. You can use jQuery to set the html/body scrollTop. Example: $(window).load(functio ...
  • 我使用了jQuery outerWidth方法。 $(function() { $(document).on('DOMNodeInserted DOMNodeRemoved', '.tag-wrapper', function(e) { $('#p').text('tag-wrapper width: ' + $('.tag-wrapper').outerWidth() + 'tag-scroller width: ' + $('.tag-scroller').outerWidth()); ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)