Repository navigation
chore(release): v0.2.0 - #9
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Lean, fast defaults (breaking)
Without any tuning, clients and consumers now perform like a hand-tuned 0.1 configuration
(ADR 0008):
JSON document);
fanferro.idandfanferro.type(typed messages) travel as message attributes,content-typeonly for payloads that are not JSON. CloudEvents is opt-in:Client(envelope=fanferro.envelopes.CloudEvents()). Consumers still read CloudEvents (JSON andprotobuf), so messages from 0.1 producers keep working.
Client(verify_md5=True).consumer.stop()returns at once:ShutdownPolicy.abort_receivesdefaults toTrue(runninghandlers still drain). SQS may still hand the aborted long poll up to
batch_sizemessages perpoller; they are redelivered after their visibility timeout.
min_receive_batchhandler slots are free (default:batch_size; FIFO queues: 1), for at mostreceive_batch_wait(0.1 s) after the first one, andprefetchdefaults to one receive batch per poller (min(batch_size, concurrency) 脳 pollers).message while the delete is in flight; settlements in progress are bounded separately.
settle_linger(5 ms) to fill abatch of ten, and are sent at once when every running handler awaits an explicit settlement
in that batch.
background (
consumer.stop()waits for it).consumer.stats()["processed"]and themessage.processedevent count handlers that succeeded;stats()["engine"]["messages_acked"]counts confirmed deletes, and a failed delete is reported as a
message.ack_failedevent. Explicitsettlements (
await message.ack()...) still resolve once SQS confirmed them.consumer.stop()andclient.close()no longer wait up to half a second for the dispatcher orthe event pump, and events emitted just before
close()are no longer lost.in batches, event checks, type names and encoders are cached, and messages are no longer copied
while being decoded.
Migrating from 0.1:
Upgrade consumers before producers. 0.1 consumers read 0.2 messages (typed routes, message ids
and filter policies on
fanferro.typework), but they do not imply JSON for raw messages:untyped routes see JSON scalars as
bytes, and CloudEvents metadata (message.source,subject, headers) is absent.Services that parse fanferro messages as CloudEvents themselves keep producing them with
Client(envelope=fanferro.envelopes.CloudEvents()).The 0.1 behaviour is one configuration away:
Features
Bug fixes
Performance