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.
- 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