Sending Spring Integration messages over RMI seamlessly? - rmi

Is there a way to send Spring Messages over an int-rmi:outbound to int-rmi:inbound gateway?
I've got two components that both use Spring Integration and I'd ideally like to send a Message between them so the receiving component can then seamlessly use a router or filters to decide where that message ends up.
The components are both written in Java, but are running in separate processes (Probably on the same machine but it's not guaranteed).
I've managed to use Spring integration to get Component 1 to call a Method on Component 2 and then for Component 2 to call a Method on Component 1, using RMI, and I Set the parameter of the RMI method to a Message which I can then obtain a channel and send into Spring Integration's flow.
But I was wondering if there was a way to skip that last step? And just have the Message flow through the two applications.

Sorry, it isn't clear what is the issue.
Actually it works out-of-the-box.
Here is a test-case as a sample

Related

Is it possible to have Gatling JMS listen for messages only?

I've been exploring the use of Gatling for JMS testing as part of broader perf testing of our AUT. I've played with the example as found at https://gatling.io/docs/current/jms/, and have successfully had gatling create a queue on my test ActiveMQ server, and read the message.
However, actual AUT testing needs dictates that services in our app will create the msgs on our ActiveMQ server - and all I want in my Gatling code is make REST calls to our services that generate the messages, then the Gatling JMS code should pick up the messages, parse them as appropriate, and when I find a certain message, move on to the next bit of the test.
As per the gatling link above, "Currently, requestReply and send (fire and forget) requests are supported." Does this mean what I am trying to do is impossible? Does this mean I have to create the messages with Gatling, but not necessarily look for a reply?
If it is possible, I assume I could split the example I've been playing with into 2 separate exec actions - one to send, and one to receive? But how?
Thanks!
No, it's not possible at the moment (Gatling 3.3).

Send data from Fuse, or a Topic, to Jboss BPM Suite

I would like to send all data received from fuse, in a specific Topic, to a Business Process in BPM Studio. Is there any way?
Example:
I send a value to 'testTopic' in Fuse. Then Fuse send this value to a Business Process (or the Business Process retrieve it), then the Business Process do things based on the value recevied, like sending another value to another topic
Is somithing of this kind possible?
Yes it most definitely is possible, although you would need to route from the 'testTopic' to one of the JMS Queues that jBPM can listen on and transform the message to reflect a valid jBPM command. The generic principle is described in the documentation at http://docs.jboss.org/jbpm/v6.0/userguide/jBPMRemoteAPI.html#d0e12149. The real power becomes clear when you look at all the jBPM commands you can send in the packages
org.drools.core.command.runtime.process (Maven: org.drools:drools-core)
and
org.jbpm.services.task.commands (Maven: org.jbpm:jbpm-human-task-core).
When talking from the outside world, it would typically be necessary to identify a correlationKey in the process which is basically the "Business Key" that can be used to identify a process uniquely e.g. as 'ApplicationNumber' for an application process. This can be used to then identify which process you may want to signal/abort/etc.
Since you are working in Fuse you should probably also consider routing that message to the jBPM Rest API described at http://docs.jboss.org/jbpm/v6.0/userguide/jBPMRemoteAPI.html#d0e10088. This may simplify your code a bit because it is a more synchronous API. The drawback however is the REST over HTTP invocation typically does not respect the local transaction.

JMS | IBM Websphere Application Server 8.5 | How to see messages and their formats lying on queues

I am working on a POC wherein I am trying to achieve SOAP over JMS. Basically I'll be submitting my SOAP messages directly to the jms queue and a consumer will further read these SOAP messages and process them. The reason we want to stick to SOAP is because it is a standard formatand we'll not have to do something extra to design a new standard form messages.
For this poc I am using the default messaging provider which comes by default with IBM websphere app server 8.5. I referred to the following and I am able to submit my messages to queue. The problem is that I expected the SOAP to stay as XML/String on my queue however it is getting converted into a byte message.
I want to check the message and its type on my queue using some kind of queue browser tool which could work with IBM WAS8.5 . I googled and found that there are a lot of Queue browser tools available for servers like Glassfish etc but I couldn't find any tool or option for IBM WAS8.5?
Can you please guide me on what I can do to ensure that my SOAP message stays as XML on JMS queue and any GUI tool/option I could use to see the message and its type on Queue ?
Regards
Aakash
You can use the SIB Explorer tool to view the messages on the queue in WAS. The link to the tool is here.
There is also the SIB Destination Handler tool that allows you to perform more actions on the messages that you might find useful for your issue (like printing out properties etc). The SIB Destination Handler tool can be found here.
In addition to tools mentioned by whitfiea you can use web admin console and go to:
Buses > myBus > Destinations > myQueue > Queue points >
myQueue#rad9vmNode02.server1-myBus > (switch to the Runtime tab) > Messages
then select the message. You should be able to see the message contents.

Sending multiple messages to JMS queue in Mule

I am new to Mule. I am using RabbitMQ. In my Mule studio, I have configured AMQP in Mule studio.
I am able to run a flow where I put one message read from HTTP endpoint payload and put into a queue.
Now, I need to send multiple messages, say 1000, to that queue at a time. One option is that I hit the url in the browser that many times but that is very time consuming. I want to send 1000 messages at one go. How can i do that in mule? or How should I proceed with it?
It sounds like your trying to load test your Mule app. I would use something like Apache JMeter. JMeter will allow you to enter the url of your endpoint and set how many times to call it and many other more advanced features.
A good blog post on using JMeter and Mule is available here: http://blogs.mulesoft.org/measuring-the-performance-of-your-mule-esb-application/

Delivery different kind of protocols in a SOA architecture

I have a project that is currently in production delivering some web-services using the REST approach. Right now, I need to delivery some of this web-services in SOAP too (it means that I will need to deliver some of the same web-services in SOAP and others a bit different), so, I ask you:
Should I incorporate to the existent project the SOAP stack (libraries, configuration files, ...), building another layer that deliver the data in envelopes way (some people call it "anti-corruption layer") ?
Should I build another project using just the canonical model in common (become it in a shared-library) ?
... Or how do you proceed in similar situations ?
Please, consider our ideal target a SOA architecture.
Thanks.
In our projects we have a facade layer which exposes the services and maps to business entities, and a business layer where the business logic is run.
So to add a SOAP end point for an existing service, we just create a new facade and call in to the same business logic.
In many cases it is even simpler, since we use WCF we can have a http SOAP endpoint for external clients, and a binary tcpip endpoint for internal clients. The new endpoint can be added by changing the configuration without any need to change the code.
The way I think about an SOA system, you have messages and pub/sub. The message is the interface. Getting those messages into and out of the system is an implementation detail. I create an endpoint that accepts a raw message document (more REST-like, but not really REST) as well as an endpoint that accepts the message as a single parameter to a SOAP call. The code that processes the incoming message is a separate concern from the HTTP endpoint enablement.
You can use an ESB for this. Where ESB receive the soap messages and send the rest request to the back end. WSO2 ESB provides this functionality. Please look at this sample[1].
[1] http://wso2.org/project/esb/java/4.0.0/docs/samples/proxy_samples.html#Sample152