How to find number of messages in IBM MQ in Mule - mule4

Is there a way to find the count of messages in IBM MQ in Mule.
Thanks in advance

It is not possible. The Mule IBM MQ Connector has operations to read and publish messages, but none for performing queue management functions or queries.
It is because the connector implementation uses the Java JMS API application which has that limitation.
Note that usually client's of message brokers consume messages but don't attempt to query or control que queues.
You can find IBM MQ admin commands to query the information.

Related

Can AppDynamics (AppD) calculate the number of messages consumed and published by an application from a JMS queue and topic?

I have an application that is being monitored by AppDynamics. The application consumes from a JMS queue and publishes messages to a JMS topic.
I would like to create a widget that displays the number of messages it is consuming from the queue and the number of messages it is publishing to the topic.
How do I identify the data source of the queue and topic then retrieve the number of messages that the application is consuming and then publishing?
For the consumption of messages, these can be instrumented as Business Transactions (see https://docs.appdynamics.com/appd/22.x/latest/en/application-monitoring/configure-instrumentation/transaction-detection-rules/message-queue-entry-points) - then the BT count will be the number of messages consumed.
For the publishing to a topic, these will be represented as exit calls to a backend (assuming this is not instrumented) - then the backend (a.k.a Remote Service) call count will be the number of pushes to the topic.
For actually directly getting the number of messages on a queue, you may want to use a Machine Agent extension:
e.g.
WebSphere MQ: https://developer.cisco.com/codeexchange/github/repo/Appdynamics/websphere-mq-monitoring-extension
ActiveMQ: https://developer.cisco.com/codeexchange/github/repo/Appdynamics/activemq-monitoring-extension
RabbitMQ: https://developer.cisco.com/codeexchange/github/repo/Appdynamics/rabbitmq-monitoring-extension
Docs on using extensions can be found here: https://docs.appdynamics.com/appd/22.x/latest/en/infrastructure-visibility/machine-agent/extensions-and-custom-metrics

Distributing Axon Framework events using Amazon messaging services

Axon Framework supports Distributing Events which should allow to post events to the external message broken and read events from message broker.
Amazon provides two different messaging services
Amazon Simple Queue Service (SQS)
Amazon MQ
Questions:
What Amazon messaging service might be used (SQS, MQ or may be both) as message queue with Axon Framework?
What is the best practice for implementing distributed Axon message processing in Amazon EC2 cloud?
It looks like that Amazon MQ should work fine with Axon Framework as message queue because it supports AMQP. But I failed to find any references about any practical experience using MQ with Axon.
Any messaging service implementation which supports, AMQP should work just fine with the Axon Framework. More specifically together with the axon-amqp dependency, as you might already have found out.
Without personally having any experience with Amazon SQS or MQ, I did a quick search on both, and it seems Amazon MQ is indeed the go to solution to distributed your events on Amazon EC2.
I do not have or heard any best practices for distributed your Axon Framework events over Amazon EC2 specifically, sadly enough, but I can share this.
All the Axon Framework (when adding the axon-amqp dependency) does, is subscribe to the EventBus and publish any incoming events on a queue; no further specifics.
Hence I'd say any best practices for general use of Amazon MQ should apply on your second question.

What are the chances for blockage of messages in persistent queues in mule?

I read that message loss in persistent queues is zero,but I want to know the chances for blockage of messages in persistent queues in Mulesoft. If it happens what are the ways to rectify that problem?
Persistent queues ensures zero message loss, sometimes messages can get stuck and needs to be cleared, you need to check queues in Mule Management Console, if you have Enterprise Edition you can manage queues there.
Similar feature of queues is available in CloudHub as well. Also checkout, official documentation of MuleSoft.
https://docs.mulesoft.com/mule-user-guide/v/3.4/configuring-queues#configuring-queues

#solace Migration from MQ on mainframe to Solace

We are using mainframe application and from mainframe we write lots of messages to MQ to send to downstream. We are planning to migrate from MQ to Solace on mainframe. Is it possible? Solace supports mainframe applications?
How can we put messages to solace from mainframe batch and online(IMS transactions)?
Thanks,
Praveen.
Solace does not support mainframe applications directly but Solace can be easily integrated with IBM DataPower appliances which can interface with mainframe applications. The DataPower appliance can handle the transformation requirement of the service and the Solace appliance can handle the messaging portion to provide quick and efficient message delivery downstream.
The 'Solace Integration with IBM Datapower' integration guide, available on the Solace Developer Portal, has more information on this:
http://dev.solacesystems.com/integration-guides/ibm-datapower/
You may also be able to use Solace's REST interface, depending on your Mainframe application. Solace's REST interface allows communication using standard POST HTTP requests.
There are also guides for Solace's REST interface available on the Solace Developer Portal:
http://dev.solacesystems.com/docs/open-apis-protocols-docs/
Old thread, but Mainframe is a long lasting tech.
Solace now provide an open-source bridge for IBM MQ Bridge, so MainFrame<->IBM MQ<->Solace is possible.
Datapower integration using JMS to connect to Solace is still possible.
Solace REST Messaging API is still possible.
And finally OpenLegacy can help here :
https://www.openlegacy.com/

How to pause SFTP Connector in Mule ESB CE

I need to pause a SFTP Connector from polling and then restart it after a specified interval, in Mule ESB CE 3.2.1.
Do you know if it's possible, by using Mule's API if necessary?
And, if it was possible, how could I disconnect and reconnect an SFTP client?
Thanks in advance,
Gabriele
I suggest you first try to practice pausing/stopping/starting through JMX, in order to determine exactly what Mule component you want to interact with (the SFTP connector? the flow that uses the connector? just the SFTP inbound endpoint?).
When you have decided exactly what it is you want to do, you can then either do it:
Through JMX calls in the JVM directly on the Mule MBeans,
Through Mule API calls starting by locating the target components in the registry.

Resources