Repository navigation
Description
Summary
Cross-language parity audit of the C#, Java, TypeScript, and Go code generators against five generated-client fixes that were recently made (or deferred) in the Python templates: #471, #472, #481, #482, #486.
Bottom line: no high-severity cross-language parity bugs. Most of the Python defects were specific to Python idioms (the paho threaded network loop, dynamic method-name overwrite, the app.py feeder scaffolding) and do not replicate in the statically-typed / differently-structured C#/Java/TS SDKs. #471 was already fixed cross-language when it landed. Two minor, low-severity observations are noted at the end.
Parity matrix
| Issue | Python | C# | Java | TypeScript | Go |
|---|---|---|---|---|---|
| #471 duplicate URI-template placeholder params | fixed | ✅ fixed (CE path) | ✅ fixed (CE path) | ✅ fixed | N/A (single resolved source) |
| #486 MQTT disconnect drops queued QoS-1 | fixed | ✅ no gap | ✅ no gap | ✅ no gap | N/A (no mqttclient) |
#482 colliding send_amqp method names |
not planned | ✅ no gap | ✅ no gap | ✅ no gap | N/A (no amqpproducer) |
| #472 AMQP CE binary-mode app properties | not planned | ✅ no gap | ✅ no gap (structured) | ✅ no gap (binary) | N/A |
#481 app.py cross-transport dependency |
fixed | N/A | N/A | N/A | N/A |
(Go implements only kafkaproducer / kafkaconsumer, so MQTT/AMQP rows are N/A.)
Evidence per issue
#486 — MQTT disconnect drops queued QoS-1 publishes
The Python bug was structural to paho-python: publish_* was fire-and-forget and disconnect() called loop_stop() (joining the network thread) before disconnect(), dropping the last QoS-1 packet. The other languages do not share this concurrency model:
- C# (
cs/mqttclient/src/Producer.cs.jinja:185):await this.Client.PublishAsync(message);— MQTTnetPublishAsyncawaits the PUBACK per-call for QoS-1, so nothing is queued when the caller later disconnects (Tools.cs.jinja:199await _client.DisconnectAsync();). - Java (
java/mqttclient/.../Producer.java.jinja:136,189): publish is fire-and-forget, but disconnect uses gracefulclient.disconnect()(notdisconnectForcibly()); Paho mqttv5's default 30s quiesce flushes in-flight QoS-1 before disconnecting. - TypeScript (
ts/mqttclient/src/client.ts.jinja:509,521): publish isPromise-wrapped on the PUBACK callback and awaited; disconnect uses gracefulclient.end(false, ...)which flushes the outgoing queue.
#482 — colliding AMQP send-method names
Python emitted several methods all named send_amqp (last one wins). The other languages already suffix the method with the message name, so names are unique:
- C#
cs/amqpproducer/src/EventProducer.cs.jinja:153→Send{{ messagename }}Async(...) - Java
java/amqpproducer/.../EventProducer.java.jinja:125/152→send{{ messagename }}(...) - TS
ts/amqpproducer/src/producer.ts.jinja:135/269→send{{ messagename }}(...)/send{{ messagename }}Batch(...)
#472 — AMQP CloudEvents binary-mode application properties
Python produced a malformed AMQP message (raw application/json body + only protocoloption properties — neither valid binary nor structured mode). The other languages emit well-formed CloudEvents:
- C#
cs/amqpproducer/src/EventProducer.cs.jinja:167delegates toCloudNative.CloudEvents.AmqpToAmqpMessage(contentMode, formatter)(supports binary and structured). - TypeScript
ts/amqpproducer/src/producer.ts.jinja:187-215sets binary-mode properties:cloudEvents:specversion/id/type/source[/subject/time]. - Java
java/amqpproducer/.../EventProducer.java.jinja:159-170uses structured mode (contentType("application/cloudevents+json"), full event in body) — a valid CloudEvents AMQP binding.
#482 / #472 note
Both were closed NOT_PLANNED in Python, so this audit does not propose reopening them; the other languages are unaffected regardless.
#481 — app.py cross-transport dependency
Python-specific feeder scaffolding (importlib.import_module(f"{PY_MODULE}_mqtt.app")). C#/Java/TS/Go generate only transport-local sources/exports (e.g. ts/*/src/index.ts.jinja re-exports the local class); no cross-transport companion entrypoint exists. N/A elsewhere.
#471 — duplicate URI-template placeholder params
Fixed cross-language in dc7f3dd / #484 (py/cs/java/ts; Go passes a single resolved source). Verified: for CloudEvents messages every C#/Java producer resolves to the fixed cloudEvents.DeclareUriTemplateArguments dedup macro (e.g. cs/kafkaproducer/src/Producer.cs.jinja:93).
Minor observations (low severity — no action required)
A. Non-CloudEvents transport-native DeclareUriTemplateArguments copies lack the #471 dedup guard. In both cs and java _common, only cloudevents.jinja.include and amqp.jinja.include carry the emitted.args dedup; the kafka / eventhubs / servicebus / mqtt includes do not. These are used only for non-CloudEvents envelope messages (via EmitArguments over protocoloption templates), a rarely-exercised path with a different emission structure. Unverified whether a placeholder repeated across two protocoloption templates would produce a duplicate parameter there.
B. Java amqpproducer offers only structured mode for CloudEvents. C# (ToAmqpMessage(contentMode)) and TS (explicit cloudEvents:* properties) can emit binary mode, but Java emits only application/cloudevents+json structured mode. Brokers/routers that filter on CloudEvents AMQP application properties cannot route Java-produced messages by CE attributes. This is a feature-parity gap, not a correctness bug.
Recommendation
Close as documentation, or optionally address observations A and/or B as small independent follow-ups. No urgent fixes required.
Audit performed across xrcg/templates/{cs,java,ts,go} mqttclient/amqpproducer templates.
Activity
Add AMQP binary content mode (Java) + fix MQTT topic-placeholder dedu…