smqd-bridge-http


License

License

GroupId

GroupId

com.thing2x
ArtifactId

ArtifactId

smqd-bridge-http_2.12
Last Version

Last Version

0.4.7
Release Date

Release Date

Type

Type

jar
Description

Description

smqd-bridge-http
smqd-bridge-http
Project URL

Project URL

https://github.com/smqd/
Project Organization

Project Organization

UANGEL
Source Code Management

Source Code Management

https://github.com/smqd/smqd-bridge-http

Download smqd-bridge-http_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.thing2x/smqd-bridge-http_2.12/ -->
<dependency>
    <groupId>com.thing2x</groupId>
    <artifactId>smqd-bridge-http_2.12</artifactId>
    <version>0.4.7</version>
</dependency>
// https://jarcasting.com/artifacts/com.thing2x/smqd-bridge-http_2.12/
implementation 'com.thing2x:smqd-bridge-http_2.12:0.4.7'
// https://jarcasting.com/artifacts/com.thing2x/smqd-bridge-http_2.12/
implementation ("com.thing2x:smqd-bridge-http_2.12:0.4.7")
'com.thing2x:smqd-bridge-http_2.12:jar:0.4.7'
<dependency org="com.thing2x" name="smqd-bridge-http_2.12" rev="0.4.7">
  <artifact name="smqd-bridge-http_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.thing2x', module='smqd-bridge-http_2.12', version='0.4.7')
)
libraryDependencies += "com.thing2x" % "smqd-bridge-http_2.12" % "0.4.7"
[com.thing2x/smqd-bridge-http_2.12 "0.4.7"]

Dependencies

compile (1)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.6

provided (1)

Group / Artifact Type Version
com.thing2x : smqd-core_2.12 jar [0.4.7, 0.5)

test (2)

Group / Artifact Type Version
com.typesafe.akka : akka-testkit_2.12 jar 2.5.17
org.scalatest : scalatest_2.12 jar 3.0.5

Project Modules

There are no modules declared in this project.

SMQD HTTP Bridge

License Build Status Sonatype Nexus (Releases) Sonatype Nexus (Snapshots)

Usage

    libraryDependencies += "com.thing2x.smqd" %% "smqd-bridge-http" % "x.y.z"

Configuration

smqd {
  bridge {

    drivers = [
      {
        name = http_br
        entry.plugin = thing2x-bridge-http
        config {
            parallelism = 4
            queue = 20
            overflow-strategy = drop-buffer
            bridges = [
              {
                topic = "sensor/+/temperature"
                content-type = text/plain
                method = POST     # PUT, POST
                prefix = http://192.168.1.100/api/receiver/
                suffix = ?from=smqd-01
              },
              {
                topic = "sensor/+/humidity"
                content-type = application/octet-stream
                method = POST     # PUT, POST
                uri = http://192.168.1.100/api/receiver/endpoint
              }
            ]
        }
      }
    ]
  }
}

driver settings

  • parallelism

    must be non-zero positive integer, default is 1

  • queue

    size of driver's queue, default is 10

  • overflow-strategy

    queue overflow strategy

    • drop-head
    • drop-tail
    • drop-buffer (default)
    • drop-new
    • backpressure
    • fail

bridge settings

  • topic

    topic filter that the bridge will subscribe

  • content-type

    if not specified, default is application/octet-stream

  • method

    http method, POST, PUT

  • prefix & suffix

    the final http endpoint will be prefix + topic + suffix.

    As example, if prefix = http://192.168.1.100:80/api/receiver/, suffix = ?from=smq-01, the messages published to sensor/123/temperature will be delivered to http://192.168.1.100:80/api/receiver/sensor/123/temperature?from=smq-01

  • uri

    if uri is defined, prefix and suffix are ignored.

    all messages published to the topic will be bridged to the specified uri

com.thing2x

SMQD

MQTT broker and embeddable concurrent messaging framework

Versions

Version
0.4.7
0.4.1
0.4.0
0.3.4