I know JMS and PHP don't get along very easily. I'm in a project where we need to read a jms bus to extract some information using PHP (imagine a java backend application putting messages on the jms buss (using openmq) and a php frontend application that needs to read those messages).
I've tried PHPMQ with no success and I'm wondering if some one else has a suggestion?
Thanks!
Ivan
ActiveMQ supports JMS for PHP through the Stomp Protocol.
Related
I need to create a very simple active mq code in Java to send one send messages to a particular topic.
I am using active mq from javascript to create a topic and send/recive.
This is working fine. It using stomp.
I've been looking for the quickest easiest way to just send messages to an active mq topic using java. Do I need to do any thing with stomp? or can I just send messages.
Is tehre any simple example i need to send a json text string but want the simplesest implementation.
thanks
Nothing special needed. You can connect up to ActiveMQ any protocol you'd like. I'd recommend the JMS API/OpenWire protocol approach, since its ActiveMQ's native and OpenWire has the most features. ActiveMQ automatically supports swapping b/w protocols, so it should just work.
The only tricky thing is mapping destinations. STOMP tends to use "/" and JMS+OpenWire uses "." as a separator. In your Java code use "MY.TOPIC" whereas the STOMP code in JS might be "/topic/MY/TOPIC" for the topic name.
I'm trying to implement something similar to https://code.msdn.microsoft.com/Brokered-Messaging-Request-0ce8fcaf#content in Java, but can't find functionality from the Service Bus Java SDK to match the QueueClient.AcceptMessageSession used in the example.
So how can I make the client to poll the response queue only for messages that match the expected sessionId? Do I need to create a seperate response queue for each client? Or is it best practise to re-insert non matching messages back to the queue?
I'm using the com.microsoft.azure/azure-servicebus maven package version 0.9.3.
Seems that this feature is not supported in the Java SDK because it uses the service bus REST api instead of the WFC api. Topic/Subscription way might be the only way to implement this with the Java SDK.
More detail: https://github.com/Azure/azure-sdk-for-java/issues/246
#HannuHuhtanen, in my mind, I think the solution is that using two JMS connections to seperately connect two service bus queues for a continuous WebJob as server and clients, please try to refer to the tutorial to know how to use JMS with AMQP for ServiceBus.
I'm using RabbitMQ, Spring and SockJS.
My app generatea many different messages and posts them to rabbitmq via stomp. This generation requires a lot of resources so I want to know is there any subscriptions to rabbitmq and what kind of subscription it is (I need to know routing keys of this subscriptions) to avoid generating unnecessary messages.
Is there any possibilities to get this information from Spring or any Java client library?
You can find all the information using one or more of the following
command line tool rabbitmqctl
rabbitmq http api
rabbitmq management (web ui)
There is a library to get information from rabbitmq http api https://github.com/rabbitmq/hop
I am looking for an example or code snippets on using Spring's STOMP topic pub/sub messaging, with both the client and server in the same tomcat7 instance. NOT OVER THE WEBSOCKET.
We want to handle some operations asynchronously in our server side and so want to use STOMP as our messaging protocol in our tomcat7 instance. Everywhere I look I find samples for STOMP over websocket or integrating with other MOM's!!
Anyone know about a java sample for simple spring stomp pub/sub? Appreciate any pointers...Thanks.
Have a look at the Spring Websocket Portfolio application. Yes, I know you said not over websocket, but the application has some tests that use a STOMP client/server that might just be what you are looking for.
I have looked up Google and Spring documentation but can not find any thing on receiving emails.
I need to build a client (kind of not fully blown client) that can receive emails from POP3 and IMAP. I am already using Spring in the project so preference is Spring.
Lots of links point to James but while it does look like a good project does not provide enough documentation and I am not even sure it does what I am after i.e just a small client that is able to to receive emails.
Spring integration was designed to solve these kind of problems. In particular it has e-mail receiving adapters. Here is an IMAP example from the documentation:
<mail:inbound-channel-adapter id="imapAdapter"
store-uri="imaps://[username]:[password]#imap.gmail.com/INBOX"
java-mail-properties="javaMailProperties"
channel="recieveChannel"
should-delete-messages="true"
should-mark-messages-as-read="true"
auto-startup="true">
<int:poller max-messages-per-poll="1" fixed-rate="5000"/>
</mail:inbound-channel-adapter>
POP3 and IMAP are not protocols that receive email. They go out and fetch it from a server.
The official JavaMail API
provides a platform-independent and protocol-independent framework to build mail and messaging applications.
Take a look!