Skip to content

Commit a341dca

Browse files
committed
replace mosquitto with artemis
1 parent 67f7a3a commit a341dca

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

.github/workflows/pr_tests.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -492,12 +492,12 @@ jobs:
492492
# - test-basic
493493
# - test-mqtt-smoke
494494
services:
495-
mosquitto:
496-
image: eclipse-mosquitto:latest
495+
artemis:
496+
image: apache/activemq-artemis:latest-alpine
497+
env:
498+
ANONYMOUS_LOGIN: "true"
497499
ports:
498500
- 1883:1883
499-
volumes:
500-
- ./dev/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
501501
steps:
502502
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
503503
with:

dev/mosquitto/mosquitto.conf

Lines changed: 0 additions & 2 deletions
This file was deleted.

docker-compose.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ services:
4141
security_opt:
4242
- no-new-privileges:true
4343

44-
mosquitto:
45-
image: eclipse-mosquitto:latest
44+
artemis:
45+
image: apache/activemq-artemis:latest-alpine
46+
environment:
47+
ANONYMOUS_LOGIN: "true"
4648
ports:
4749
- 1883:1883
4850
security_opt:
4951
- no-new-privileges:true
50-
volumes:
51-
- ./dev/mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
5252

5353
faststream:
5454
build: .

faststream/mqtt/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from typing import TYPE_CHECKING, cast
22

33
from faststream._internal.basic_types import DecodedMessage
4-
from faststream._internal.constants import ContentTypes
4+
from faststream._internal.constants import ContentType, ContentTypes
55
from faststream.message import decode_message
66
from faststream.mqtt.message import MQTTMessage
77

@@ -16,7 +16,7 @@ class MQTTParser:
1616
async def parse_message(self, message: "Message") -> MQTTMessage:
1717
payload = message.payload
1818
ct = (
19-
message.properties.ContentType # type: ignore[attr-defined]
19+
getattr(message.properties, "ContentType", ContentTypes.TEXT.value) # type: ignore[attr-defined]
2020
if message.properties
2121
else ContentTypes.TEXT.value
2222
)

0 commit comments

Comments
 (0)