⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@afprtclr
Copy link
Contributor

@afprtclr afprtclr commented Dec 8, 2025

No description provided.

@afprtclr afprtclr force-pushed the feature/cloudevents-samples branch 2 times, most recently from 67fff30 to 0ebe56a Compare December 10, 2025 14:27
@afprtclr afprtclr changed the title Adding Azure Service Bus CloudEvents sample Adding CloudEvents samples for ASB and SQS Dec 10, 2025
@afprtclr afprtclr force-pushed the feature/cloudevents-samples branch 2 times, most recently from 63be0a2 to 68f2071 Compare December 16, 2025 11:52
@afprtclr afprtclr force-pushed the feature/cloudevents-samples branch from 68f2071 to e48e8db Compare December 19, 2025 09:32

### Envelope handling metrics

Various metrics track performance of the envelope handling when interoperating with external systems. The generic metrics include:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Various metrics track performance of the envelope handling when interoperating with external systems. The generic metrics include:
Various metrics track envelope-handling performance when receiving messages that require envelope unwrapping, such as CloudEvents. The generic metrics include:


Various metrics track performance of the envelope handling when interoperating with external systems. The generic metrics include:

- Envelope unwrapping errors - how many times a single envelope handler failed to unwrap the incoming message
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Envelope unwrapping errors - how many times a single envelope handler failed to unwrap the incoming message
- Envelope unwrapping attempts - how many times a single envelope handler attempted to unwrap an incoming message. The metric also reports whether the operation was successful or not, the envelope handler type, and the exception in case of failure

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we specify here the metric name: nservicebus.envelope.unwrapped?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: We're not sure, yet, if this goes into 10 or 10.1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: We're not sure, yet, if this goes into 10 or 10.1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Food for thought: Do we need a top-level Envelopes concept instead of having this in the transports folder?


### Binary Content Mode for HTTP and AMQP

NServiceBus supports [HTTP Binary Content Mode](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/http-protocol-binding.md#31-binary-content-mode) and [AMQP Binary Content Mode](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/amqp-protocol-binding.md#31-binary-content-mode).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
NServiceBus supports [HTTP Binary Content Mode](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/http-protocol-binding.md#31-binary-content-mode) and [AMQP Binary Content Mode](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/amqp-protocol-binding.md#31-binary-content-mode).
NServiceBus supports the [HTTP Binary](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/http-protocol-binding.md#31-binary-content-mode) and [AMQP Binary](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/amqp-protocol-binding.md#31-binary-content-mode) content modes.


NServiceBus supports [HTTP Binary Content Mode](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/http-protocol-binding.md#31-binary-content-mode) and [AMQP Binary Content Mode](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/bindings/amqp-protocol-binding.md#31-binary-content-mode).

To recognize the CloudEvents message, fields [`id`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id), [`source`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1), and [`type`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) must be present. The [`specversion`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) is not required to be present or to equal to `1.0`. The field names must be encoded according to the binding specification (e.g., `ce-id` for the `id` field when using HTTP). The implementation will not attempt to deserialize the payload is the headers do not meet the requirements.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To recognize the CloudEvents message, fields [`id`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id), [`source`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1), and [`type`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) must be present. The [`specversion`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) is not required to be present or to equal to `1.0`. The field names must be encoded according to the binding specification (e.g., `ce-id` for the `id` field when using HTTP). The implementation will not attempt to deserialize the payload is the headers do not meet the requirements.
To recognize the CloudEvents message, the fields [`id`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#id), [`source`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#source-1), and [`type`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#type) must be present. The [`specversion`](https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md#specversion) field is not required to be present or to equal to `1.0`.
Field names must be encoded according to the binding specification (e.g., `ce-id` for the `id` field when using HTTP).
The implementation will not attempt to deserialize the payload if the headers do not meet the requirements.


This section describes the configuration options.

### Enabling the configuration
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
### Enabling the configuration
### Enabling CloudEvents


### Type mapping

`TypeMappings` configure how to match the incoming messages with the class definitions:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`TypeMappings` configure how to match the incoming messages with the class definitions:
`TypeMappings` configure how to match the incoming message content-type value with the class definition used in the NServiceBus message handler:


### Enabled unwrappers

The `EnvelopeUnwrappers` property contains the list of enabled modes. By default, both Binary Content Mode and Structured Content Mode in Strict Mode are enabled.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is off with the word "mode," I cannot pinpoint it, but the first sentence doesn't read well. Should we move away from mode to something like envelope format? In which case, that first sentence would be:

The EnvelopeUnwrappers property lists the enabled envelope formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants