Giter Site home page Giter Site logo

snicoll / gs-messaging-jms-custom-handler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tonvanbart/gs-messaging-jms-custom-handler

0.0 1.0 0.0 14 KB

Example code for sending and receiving custom types using Spring Boot JMS.

Java 100.00%

gs-messaging-jms-custom-handler's Introduction

Sending arbitrary types with Spring JMS

This project illustrates sending and receiving custom types as JSON encoded text messages. This is a modified version of the gs-messaging-jms project (see http://spring.io/guides/gs/messaging-jms/).

The most important thing to note is setting the type id property name on the message converter:

    converter.setTypeIdPropertyName("object-type");

Reading the Spring code, without this property set encoding will work, but decoding will fail, at least when not using a @MessageListener annotated method. The setting specifies the name of a custom message header, which in this case will contain the full class name of the encoded object. It is also possible to configure a mapping from header value to serialized type.

For clarity, all beans are created explicitly in the Application class; it's also possible to annotate them as @Component and use autowiring.

The application.properties file assumes a Dockered ActiveMQ container running at 192.168.99.100, to use an embedded container, delete or comment this section.

gs-messaging-jms-custom-handler's People

Contributors

tonvanbart avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.