All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- When a socket was closed when consuming the consume block didn't return
- Messages larger than frame_max was split into too large frames, 8 bytes, didn't account for the frame wrapper
- Update code to get rid of warnings with crystal 1.12
- Connection#on_blocked/unblocked callbacks when when server is out of resources
- ConnectionInformation struct to the constructor for product name/version passing to the server
- Connection#update_secret for updating oauth secrets
- The connection is not blocked when the server is out of resources, so that queues can still be purged/deleted or messages consumed to help the server. Make sure to use the new callbacks to limit your publishes though.
Channel#basic_publish
(as well asQueue#publish
) callback now receivies a boolean if the message was Acked or Nacked by the server
- On channel close all outstanding publish confirm callbacks are rejected
Channel#basic_publish
(as well asQueue#publish
) now takes a block, which will be executed when the message is confirmedChannel#on_confirm(msgid)
is removedChannel#wait_for_confirm(msgid)
is dropped
- Raise an exception if a blocked subscriber is closed by the server
basic_publish_confirm
waits for all unconfirmed messages to be confirmed.wait_for_confirm(msgid)
andon_confirm(msgid)
and deprecated in favour of newwait_for_confirms
.
no_wait
support for queue declare/delete/purge.
- Fix bug where reopening a channel would try to reuse the closed channel
- Specs can run against RabbitMQ
- Lint
- Default to amqp protocol when scheme is missing from URI
- Update connection tune parameters after negotiation (before eg. the frame_max wouldn't be respected if tuned to a lower value by the server)
- Can configure multiple TCP options, both TCP and internal buffer sizes
- Streams queue example
- Default to 60s (before 15s) read timeout during connection establishment
- Cancel consumer if callback raises unexpected exception
- Augment Connection::ClosedException with host, user and vhost
- Don't try to reject messages coming to a deleted consumer (might have been a noack consumer)
- Don't flush socket when publishing when in transaction mode, greatly increasing Tx publishing speed
- Removed exchange_declare's exclusive parameter
- Match parameter names for inherited methods
- Close all consumers when closing Channel to prevent blocks
- Raise an exception if trying to call wait_for_confirm on a channel that isn't in confirm mode
- A OpenSSL::SSL::Context::Client can be passed to AMQP::Client and will be reused for multiple connection, saving considerable amount of memory
- Make it possible to disable TCP keepalive (by setting the values to 0)
- VERSION is correct (not the version of the app the lib is included in)
- Default connection_name to PROGRAM_NAME, for easier identifitcation in the server's connection listing
- Restore AMQP::Client::Message, as a abstract struct for Deliver and Get messages
- Requeue messages received for cancelled consumers
- Make basic_cancel no_wait by default, so that consumers with prefetch 0 won't block on it.
- Memory usage per connection is down 95%
- Allow custom queue properties also for temporary queues (where name is empty)
- Log warning that user should increase prefetch limit, when the read loop have to wait to deliver messages to worker(s)
- Queue#unsubscribe now supports the no_wait argument
- Better API documentation
- Blocking consumers can now also have multiple workers
- Better exception handling in blocking consumers
- Reduced cyclomatic complexity in many methods
- Can configure tcp keepalive settings with ?tcp_keepalive=60:10:3, (idle, interval, count)
- Can configure tcp nodelay settings with ?tcp_nodelay
- Support for AMQP Transactions
- Each connection is now using 95% less memory, 37KB/connection
- Handle CloseOk write errors
- Using a closed channel would break connection
- Raise ChannelClosedError on write if channel is closed
- Avoid trying to cancel already closed consumers
- Version is reported correctly
- Crystal 1.0.0 compability
- Expect FlowOk after sending/setting Flow mode
- Support for websockets
- AMQP::Client::Connection::ClosedException is not wrapped as AMQP::Client::Error
- All exceptions raised in this lib do now inherit from AMQP::Client::Error
- Default connect timeout is increased to 15s
- No default write timeout (was 15s before)
- By default we set the connection name to the name of the executable
- Blocking consumers are closed when connection is closed by broker
- Update for crystal 0.36.0
- Doesn't try to declare the default exchange
- work_pool parameter to Channel#basic_consume and Queue#subscribe with how many fibers that should process incoming messages, default 1
- Channel#basic_publish can now publish a Bytes array directly
- Queue#unsubscribe and Channel#basic_cancel doesn't take the no_wait argument anymore
- By default wait for Connection::CloseOk before returning
- When a consumer is canceled, we wait for CancelOk before we delete the consumer handler
- Connection#close now as a
no_wait
argument (default to true) to wait for CloseOk from the server
- Faster deliveries, by removing Log.context.set
- Socket buffer size set to 16KB (up from 8KB)
- Can set connection name, via URL (?name=MyConn) or the parameter
name
- Default channel_max is now 1024 (more than ~8000 channels will deplete the stack memory)
- Connection#channel can now accepts any type of Int
- Bug when opening many channels
- Crystal 0.34 compability
- Uses the new Log module instead of Logger
- Don't try catch Errno, it's removed in crystal 0.34
- Default to vhost '/' if path in URI is empty
- Close socket if connection establishing fails
- Connection#channel(&block) now properly closes the channel after the block returns
- Setting progname of Logger to amqp-client.cr
- read_loop doesn't log errors on connection close
- Negotiate channel_max and frame_max correctly
- Multi threading safety, a write lock is used when sending frame
- Prevent double close, closing a closed connection won't raise exception
- An exception is now raised when sending frames if the server closed the connection
- Queue#message_count and Queue#consumer_count methods (does a passive declare)
- Hostname in the URI amqp:///vhost are replaced with localhost
- Multi-threading safety
- Channel#wait_for_confirm raises ClosedException if channel is closed when returning
- Channel#on_confirm(msgid, &blk) calls the block when the specific message is confirmed
- wait_for_confirm is now fiber safe
- You can now pass an URI to the constructor
- ArgumentError if Channel#wait_for_confirm parameter is less than 1
- Don't log warning of server consumer cancellation if connection/channel is closed
- The logger writes to STDERR instead of STDOUT
- Messages from Channel#basic_get now includes a message_count property (that is how many msgs are left in the queue)
- Allow publishing IO objects and manually setting the bytesize (for IO objects that doesn't support IO#bytesize)
- Message deliveries/returns are process in a separate fiber so not to block frame processing
- Deliveries, returns and confirms are now added to unbounded internal dequeues
- Connection and channel close now use reply code 200 and no reply text
- Queue#subscribe and Channel#basic_consume can now be blocked (until canceled)
- Crystal 0.31.x deprecated URI.unescape, replaced with URI.decode_www_form
- basic_nack sends a Nack and not a reject, thank you @jgaskins for the PR