mq-jms-spring | assist MQ JMS integration with Spring frameworks | Object-Relational Mapping library
kandi X-RAY | mq-jms-spring Summary
kandi X-RAY | mq-jms-spring Summary
This repository contains code to help to provide Spring developers with easy configuration of the IBM MQ JMS package.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Configure a connection factory .
- Create a connection factory .
- Prints trace properties
- Called when an application environment is received .
- Entry point for the application .
- Print a warning .
- Receives a message .
- bean connection factory .
- Print the message started
- Print the status message .
mq-jms-spring Key Features
mq-jms-spring Examples and Code Snippets
Community Discussions
Trending Discussions on mq-jms-spring
QUESTION
I'm using IBM MQ with Spring Boot and I'm trying to delay messages with the setDeliveryDelay(time) method. This function is only supported in JMS 2.0 and I'm having problems with this, as I am running with JMS 1.1 and I cannot figure out how to upgrade to 2.0
I'm using this dependency
implementation(group: 'com.ibm.mq', name: 'mq-jms-spring-boot-starter', version: '2.6.2')
and creating this bean:
...ANSWER
Answered 2022-Jan-21 at 15:19Just continuing the conversation, but I'd like to do some formatting...
I change my maven dependency from:
QUESTION
I have two applications for the testing of the MQ events. One of them is used to send messages and another one is used to receive messages. Both of them are SpringBoot applications.
The sender app is running on port: 8000
and receiver app is running on port: 8050
pom.xml
ANSWER
Answered 2021-Oct-08 at 08:07As has been hinted in the comments your Event
class needs to be serialisable, which it does seem to be and the listener code should look something like:
QUESTION
I am trying to write a health check for our JMS connection that connects to MQ using IBM JMS integrations code ibm-messaging/mq-jms-spring. I need to detect that the connection to MQ has been lost. I hooked the exceptionListener for the DefaultJmsListenerContainerFactory and that tells me when I lose the connection to MQ but I cannot find anything in the JMS stack that tells me when the connection gets (re)established.
Code that calls the ExceptionListener
...ANSWER
Answered 2021-May-14 at 19:41From a strictly JMS perspective, when the onException
method of your ExceptionListener
is invoked it is up to your application to re-establish the JMS connection using ConnectionFactory.createConnection
. This is a blocking call so once it return successfully then you know the connection has been re-established.
If you're delegating the JMS connection management to Spring it's unlikely you will be able to be informed about when the JMS connection is re-established. I don't see any hooks in Spring JMS for this.
QUESTION
I'm using spring boot with mq-jms-spring-boot-starter
to create a JMS Listener application which reads a message from a queue, process it and forward the message in to another queue.
In case of a poison message scenario, I'm trying to generate an alert. However, in order to not generate multiple alerts to the same message, I'm thinking of comparing the JMSXDeliveryCount
with BOTHRESH
value and generate the alert in the last redelivery before sending to the BOQ.
BOTHRESH
and BOQNAME
are configured for the source queue.
ANSWER
Answered 2021-Mar-26 at 13:51This sounds like you are mixing retriable and non-retriable error handling. If you are tracking redelivers and need to send an alert, then you probably do not want to set a BOTHRESH value, and instead manage it all in your client-side code.
Recommended consumer error handling pattern:
If the message is invalid (ie.. bad JSON or XML) move to DLQ immediately. The message will never improve in quality and there is no reason to do repeated retries.
If the 'next step' in processing is down (ie. the database) reject delivery and allow redelivery delays and backout retries to kick in. This also has the benefit of allowing other consumers on the queue to attempt processing the message and eliminates the problem where one consumer has a dead path from holding up a messages.
Also, consider that using client-side consumer code to do monitoring and alerting can be problematic, since it combines different functions. If your goal is to track invalid messages, monitoring the DLQ is generally a better design pattern and it removes 'monitoring' code from your consumer code.
QUESTION
I have a strange issue that took me several days to narrow down. Basically, I have a Jhipster project based on Spring boot Version 2.1.10.RELEASE, which contains 4 microservices. We are interested here in 2 of them: Gateway and Corehub. In the gateway, I have an angular app that performs a POST to /services/corehub/api/someendpoint which used to be working and that is failing now with different error messages, but the one I have more regularly is
...ANSWER
Answered 2020-Jul-28 at 16:48If you do not want your application to be considered unhealthy when JMS is down, disabling the JMS health indicator is what I would recommend. It hasn't worked for you as you have used management.endpoint.jms.enabled
. The correct property to use is management.health.jms.enabled
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install mq-jms-spring
To get started quickly, you can use the default configuration settings in this package along with the IBM MQ for Developers container which runs the server processes.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page