Giter Site home page Giter Site logo

solace-spring-boot's Introduction

Spring boot with Solace

This repository contains 2 projects:

  • Solace producer
  • Solace consumer

The setup makes use of docker-compose to start a local Solace broker.

Configuration

The project is configured like this:

Producer:

  • Is pub/sub
  • Produce message of type OtherMessage on topic domain.org/OtherMessage/{id} using JMS
  • Produce message of type SomeMessage on topic domain.org/SomeMessage/{id} using JCSMP

Consumer:

  • listen to the queues
"SOME_MESSAGE_QUEUE"
"OTHER_MESSAGE_QUEUE"

Broker:

  • create the queues with subscriptions
"SOME_MESSAGE_QUEUE": "domain.org/SomeMessage/>"
"OTHER_MESSAGE_QUEUE": "domain.org/OtherMessage/>"
  • the /> means that will listen for everything after messageType

Solace configuration

Let's start very easy configuration. For default vpn 'default-vpn' we will create the queues

  • open console: http://localhost:8080
  • open default vpn
  • open queues menu tab
  • create new queues
  • create subscription

Or call the script create-queues-and-subscriptions.sh

That's it!

Run project:

You will need docker for this, but after that is as simple as running this command. which will start all 3 services:

docker-compose up --build --force-recreate

Note! be sure you build the projects before starting docker-compose.

Troubleshooting

  • Keep in mind that without the queue created the spring boot application will throw errors. To resolve this, just create the queues

  • Sometimes the solace-broker does not work, that's because docker does not have enough resources to run the container

    • Try to give docker at least 6gb of memory and 6cpu
  • If you implement a Deserializer for messages, keep in mind that Solace has default property JMS_Solace_isXML:true

    • some objectMappers will fail to deserialize

solace-spring-boot's People

Contributors

alexander08 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.