Skip to content

Commit b3f4ffa

Browse files
committed
Drop service name param from amqp wire
1 parent b7cf40f commit b3f4ffa

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

src/asyncapi_python/contrib/wire/amqp/factory.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ class AmqpWire(AbstractWireFactory[AmqpWireMessage, AmqpIncomingMessage]):
3232
def __init__(
3333
self,
3434
connection_url: str,
35-
service_name: str = "app",
3635
robust: bool = False,
3736
reconnect_interval: float = 1.0,
3837
max_reconnect_interval: float = 60.0,
@@ -46,7 +45,6 @@ def __init__(
4645
4746
Args:
4847
connection_url: AMQP connection URL
49-
service_name: Service name prefix for app_id
5048
robust: Enable robust connection with auto-reconnect (default: False)
5149
reconnect_interval: Initial reconnect interval in seconds (for robust mode)
5250
max_reconnect_interval: Maximum reconnect interval in seconds (for robust mode)
@@ -56,9 +54,10 @@ def __init__(
5654
on_connection_lost: Callback when connection is lost (for non-robust mode)
5755
"""
5856
self._connection_url = connection_url
59-
# Generate app_id with service name plus 8 random hex characters
57+
# Generate fallback app_id with random hex characters
58+
# Note: For RPC, app_id should be provided via EndpointParams from application level
6059
random_hex = secrets.token_hex(4) # 4 bytes = 8 hex chars
61-
self._app_id = f"{service_name}-{random_hex}"
60+
self._app_id = f"wire-{random_hex}"
6261
self._connection: AbstractConnection | None = None
6362
self._robust = robust
6463
self._reconnect_interval = reconnect_interval

tests/integration/test_wire_codec_scenarios.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
connection_url=os.environ.get(
3030
"PYTEST_AMQP_URI", "amqp://guest:guest@localhost:5672/"
3131
),
32-
service_name="test-integration",
3332
)
3433

3534
# Codec implementations

0 commit comments

Comments
 (0)