Repository navigation
What's New
- Return the result of the forwarded query or command from
ExecuteQueryandExecuteCommandwhen the subscriber returns another query or command to be republished - Add the Kafka consumer catch-up, to get notified via
IKafkaConsumerCaughtUpCallback(and optionally disconnect) once all messages of the assigned partitions are processed - Add
ConsumeFromBeginningto consume all partitions of a Kafka topic from the beginning - Reduce allocations and improve performance of the message bus and of the producer and consumer pipelines
Fixes
- Fix the subscriber filters, such as the
MqttClientIdFilterAttributeor a custom one, preventing the batch and stream subscribers from receiving any message - Preserve the original stack trace of the exceptions thrown by the subscribers consuming an
IMessageStreamObservable(orIObservable<T>) - Fix the messages returned by a subscriber in an
IObservable<T>(withAsObservable()) never reaching their subscribers - Fix the subscribers consuming an
IObservable<T>hanging when the observer throws fromOnCompleted, and committing the batch or stream without applying the error policies when the handler behind an Rx operator (e.g.,ToList()) throws - Fix the batches containing a chunked
BinaryMessagethat the subscriber doesn't read to the end, which could ignore the error policies, stall the consumer or its stop, or log a fatal error and disconnect the consumer - Fix the Kafka offsets committed when a chunked message is discarded or aborted as incomplete while consuming in batches, which could lose the pending messages of the batch, or consume the already processed ones again, after a restart or rebalance
- Store the offsets of the messages skipped or moved by the error policies, and of the discarded chunks, in the Kafka client side offset store, instead of consuming them again after a restart or rebalance
- Fix the Kafka transactional producer failing to begin any further transaction after being recreated because of a fatal error, or after reconnecting
- Stop the consumer cleanly, raising the
IConsumerTransactionManager.AbortingandIConsumerTransactionManager.Abortedevents, when the error handling fails (e.g., an error policy callback throws or the move policy can't produce the message) - Apply the error policies when the commit of a batch fails, also when its subscriber stopped enumerating it early
- Stop the consumer without applying the error policies when the commit fails after the consumer was committed (e.g., a
IConsumerTransactionManager.Committedhandler throws), instead of retrying, skipping or moving the already processed message - Fix the consumer ignoring all further reconnect requests (e.g., after a Kafka poll timeout) once stopping it to reconnect failed
- Fix some race conditions, for example reading the consumer
IConsumerStatusInfo.History(as the health check does) while its status changes, or an event handler removing itself while being invoked - Include the activity tags, such as the Kafka key, in the logging scope of the produced message
- Log the broker message identifier of the messages produced from the outbox
- Fix the header values (including the
[Header]properties) of typeNullable<T>,Guid,TimeSpan, enum orDateTimeOffsetbeing read back asnullor the default value, and the numeric ones read back wrong when written under a non-invariant culture, or theDateTimeones shifted to local time or misparsed - Fix
ExecuteCommandandExecuteQuerythrowing anInvalidOperationExceptioninstead of returningnullwhen the subscriber returnsnull, andIPublisherPublish<TResult>discarding thenullresults - Fix the synchronous
Disposeof the service provider throwing anInvalidOperationException(type only implementsIAsyncDisposable), which could leave the broker clients connected - Fix
EnableChunkingrejecting a chunk size of 1 - Fix the
x-chunk-countheader stating more chunks than produced when the message stream is not read from its beginning - Fix a message being silently dropped instead of produced when chunking is enabled and its stream is empty or already read to its end
- Fix producing a tombstone (or a
BinaryMessagewith null content) throwing anInvalidOperationExceptionwhen chunking is enabled withalwaysAddHeaders(the default) - Fix a partially read
MemoryStreambeing produced from its start, instead of from its current position like any other stream - Fix the
SymmetricEncryptStreamreturning wrong encrypted data when read with an offset, a short count or a span - Fix the
JsonMessageSerializerandJsonMessageDeserializerinstances (and the endpoint configurations containing them) never being equal on .NET 11, even with the same options - Fix
ITestingHelper.GetProducerForEndpointwith the schema registry deserializers (Avro, Protobuf, JSON) and with the MQTT endpoints subscribing multiple topics, shared subscriptions or wildcard topic filters - Make the producer returned by
ITestingHelper.GetProducerForEndpointencrypt the messages and use the QoS level and protocol version of the consumer endpoint, and resolve the friendly name to that endpoint only - Fix some race conditions in the mocked Kafka consumer and schema registry, which could throw, or deliver a message of a partition just revoked or sought
- Fix the mocked MQTT client never reconnecting after a connection attempt delayed via
IMockedMqttOptionsBuilder.DelayConnectionwas canceled - Fix the mocked MQTT broker sessions: a QoS 0 message whose connection closed before the acknowledgment no longer stays pending forever (timing out
ITestingHelper.WaitUntilAllMessagesAreConsumedAsync), the MQTT 5 sessions honor their session expiry interval instead of the clean start flag, and a client connecting with an already used client id takes over the session, disconnecting the other instance (SessionTakenOver) like the broker
See docs for details.