Skip to content

fp-in-bo/jms4s

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date
Jun 8, 2023
Nov 15, 2022
Mar 19, 2023
May 21, 2021
Jun 11, 2021
Oct 16, 2023
Mar 19, 2023
May 5, 2021
Mar 19, 2023
Apr 29, 2021
Nov 1, 2022
Oct 1, 2020
Apr 13, 2020
Apr 13, 2020
Apr 13, 2020
Sep 4, 2020
Oct 3, 2023
Mar 26, 2022

Repository files navigation

jms4s - a functional wrapper for jms

Build Status Maven Central Code of Consuct Mergify Status Scala Steward badge

Nobody really wants to use jms, but if you have no choice or you're not like us you may find this useful.

Supported features:

  • Consuming, returning a never-ending cancellable program that can concurrently consume from a queue

    • createQueueTransactedConsumer
    • createQueueAckConsumer
    • createQueueAutoAckConsumer
  • Publishing, returning a program which can publish messages

    • createQueuePublisher
    • createTopicPublisher
  • Consuming and Publishing within the same local transaction

Is it production ready™?

You're asking the wrong question.

But yes, this is currenlty used to process millions of messages per day in large scale production systems.

Quick Start

To use jms4s in an existing SBT project with Scala 2.12 or a later version, add the following dependencies to your build.sbt depending on your provider:

libraryDependencies ++= Seq(
  "dev.fpinbo" %% "jms4s-active-mq-artemis" % "<version>", // if your provider is activemq-artemis
  "dev.fpinbo" %% "jms4s-ibm-mq"            % "<version>"  // if your provider is ibmmq
)

Local dev

run tests

  • docker-compose up -d
  • sbt test

site

  • build site
docker run \
  -v $PWD:/$PWD \
  -v ~/.sbt:/root/.sbt \
  -v ~/.ivy2:/root/.ivy2 \
  -v ~/.m2:/root/.m2 \
  -v ~/.coursier:/root/.coursier \
  -w /$PWD \
  -it k3vin/sbt-java8-jekyll \
  sbt site/clean site/makeMicrosite
  • run at localhost:4000/jms4s/
docker run \
  -v $PWD:/$PWD \
  -w /$PWD/site/target/site \
  -p 4000:4000 \
  -it k3vin/sbt-java8-jekyll \
  jekyll serve -b /jms4s --host 0.0.0.0