I am trying to deploy hono with enmasse. For this, I already installed enmasse and created address spaces and addresses as follows:
enmasse_iot.yaml
apiVersion: enmasse.io/v1beta1
kind: AddressSpace
metadata:
name: iot1
spec:
type: standard
plan: standard-medium
authenticationService:
name: standard-authservice
---
apiVersion: enmasse.io/v1beta1
kind: Address
metadata:
name: iot1.command
spec:
address: command
type: anycast
plan: standard-medium-anycast
---
apiVersion: enmasse.io/v1beta1
kind: Address
metadata:
name: iot1.command-internal
spec:
address: command_internal
type: anycast
plan: standard-medium-anycast
---
apiVersion: enmasse.io/v1beta1
kind: Address
metadata:
name: iot1.command-response
spec:
address: command_response
type: anycast
plan: standard-medium-anycast
---
apiVersion: enmasse.io/v1beta1
kind: Address
metadata:
name: iot1.telemetry
spec:
address: telemetry
type: anycast
plan: standard-medium-anycast
---
apiVersion: enmasse.io/v1beta1
kind: Address
metadata:
name: iot1.event
spec:
address: event
type: queue
plan: standard-small-queue
---
apiVersion: user.enmasse.io/v1beta1
kind: MessagingUser
metadata:
name: iot1.hono
spec:
username: hono
authentication:
type: password
password: SE9OTw== # pwd=HONO, Base64 encoded
authorization:
- addresses: ["*"]
operations: ["send","recv","view","manage"]
Hono is installed over helm charts and by using following value file:
livenessProbeInitialDelaySeconds: 900
readinessProbeInitialDelaySeconds: 45
useLoadBalancer: false
amqpMessagingNetworkExample:
enabled: false
commandRouterService:
extraSecretMounts:
amqp-network:
secretName: "mysecret"
mountPath: "/etc/custom"
adapters:
http:
extraSecretMounts:
amqp-network:
secretName: mysecret
mountPath: /etc/custom
mqtt:
extraSecretMounts:
amqp-network:
secretName: mysecret
mountPath: /etc/custom
amqpMessagingNetworkSpec:
host: messaging-5355a0a.enmasse-infra
port: 5671
credentialsPath: /etc/custom/amqp-credentials.properties
commandAndControlSpec:
host: messaging-5355a0a.enmasse-infra
port: 5671
credentialsPath: /etc/custom/amqp-credentials.properties
deviceRegistryExample:
enabled: true
addExampleData: false
extraSecretMounts:
amqp-network:
secretName: mysecret
mountPath: /etc/custom
mongodb:
createInstance: false
Then I created the tenant "iot1" and added "dev" to this tenant in Hono. After that, I wrote a simple AMQP-receiver and started to instances as follows:
python ./amqp-receiver.py -s amqps://10.100.42.58:5671 -a telemetry/iot1
python ./amqp-receiver.py -s amqps://10.100.42.58:5671 -a event/iot1
On the other side, my simulated device connects itself with the MQTT-adapter of Hono and publishes both telemetry and event over mqtt. The telemetry data are received by the first amqp-receiver without any problem. But as soon as an event is published Hono's MQTT-Adapter throws a "no credit available" error!
You can find the log files of Hono and Enmasse here.
- Is something wrong with the enmasse broker - see log files?
- Are my enmasse settings wrong? Or is a better and cleaner way to setup enmassse for Hono?
- How should one handle the events and commands?
Thanks!
Update:
It seems so as the artemis-broker is not able to create the event endpoints on the fly. I.e. sending and receiving to and from queue "event" works fine, but the extension with the tenant (e.g. "event/iot1") does not work which results in no credit available error in hono's MQTT-adapter. Any idea how one can set the "auto-create-*" options of Artemis within enmasse yaml-file?