Home » Tag Archives: JMS

Tag Archives: JMS

Remote JMS with WildFly Swarm

jboss-wildfly-logo

I’m blogging about WildFly swarm again? Short version is: I needed a test for remote JMS access and refused to setup something complex like a complete application server. The idea was to have a simple WildFly Swarm application which has a queue and a topic configured. Both should be accessible remotely from a standalone Java application. While the topic receives ...

Read More »

Message Durability in ActiveMQ 5.x

apache-activemq-logo

I get asked quite a bit to explain the basics of how ActiveMQ works with respect to how it stores messages (or doesn’t in some cases). Here’s the high level explanation of it. Note, the context is within JMS. If you use ActiveMQ’s non JMS clients (ie, STOMP, AMQP, MQTT, etc) then the behavior may be different in some cases. ...

Read More »

AWS SQS and Spring JMS integration

spring-interview-questions-answers

Amazon WEB Services provide us with the SQS messaging service. The java sdk for sqs is compatible with JMS. Therefore instead of using SQS as a simple spring bean we can integrate it with the JMS integration framework that spring provides. I will use spring-boot and gradle. The gradle file: group 'com.gkatzioura.sqstesting' version '1.0-SNAPSHOT' buildscript { repositories { mavenCentral() } ...

Read More »

Automated provisioning of JMS resources in Java EE 7

java-interview-questions-answers

JMS 2.0 (part of the Java EE 7 Platform) introduced lots of nice features. One of these was the ability to declare JMS resources for automatic deployment. Pre Java EE 7 Inject Connection Factory using @Resource Lookup Destination (Queue/Topic) using @Resource Pull out the Session object and use it to create the Message, Message Producer and send the message Most ...

Read More »

JMS Sender application with ActiveMQ and Maven

apache-activemq-logo

We have already seen how to create a JMS Receiver application with ActiveMQ and Maven. Let’s check out how we can similarly create the JMS Sender application. web.xml remains the same as we had used for creating the receiver application: <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/jmsContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> </web-app> jmsContext.xml would change a bit to something like: ...

Read More »

New in JMS 2.0

java-interview-questions-answers

This post lists ALL of the new APIs (interfaces/classes/annotations etc.) introduced in JMS 2.0 (part of the Java EE 7 platform). These have been categorized as follows API simplification Ease of use Exception Handling Miscellaneous Here is a quick summary along with some code snippets API simplification JMSContext Simpler abstraction on top of Connection and Session objects which eliminates the ...

Read More »

ActiveMQ as a Message Broker for Logstash

apache-activemq-logo

When scaling Logstash it is common to add a message broker that is used to temporarily buffer incoming messages before they are being processed by one or more Logstash nodes. Data is pushed to the brokers either through a shipper like Beaver that reads logfiles and sends each event to the broker. Alternatively the application can send the log events ...

Read More »

Sending JMS Messages From WildFly 8 To WebLogic 12 with Camel

apache-camel-logo

System integration is a nice challenge. Especially, when you’re looking for communication standards and reliable solutions. In today’s microservices world, everybody talks about REST services and http-based protocols. As a matter of fact, this will never be enough for most enterprise projects which typically tend to have a much more complex set of requirements. A reasonable solution is a Java ...

Read More »

Types of JMSContext in JMS 2.0

java-interview-questions-answers

If you follow Java EE, the simplified API components in JMS 2.0 (Java EE 7) will not be unknown to you. One of the important interfaces which forms a part of the simplified API is the javax.jms.JMSContext interface. JMSContext can be categorized in to two types depending on how it’s instance is obtained and managed (life cycle) – Container managed ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials