Lee Henson
unread,Jun 3, 2011, 12:26:46 PM6/3/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to AMQP
Hi again
I see that amq-protocol seems to have some of the pieces for
supporting publisher confirms. Is there anything more to be added to
amq-client's channel.rb other than the same sort of blocks that are
defined for transaction support? e.g.
def tx_select(&block)
@connection.send_frame(Protocol::Tx::Select.encode(@id))
self.redefine_callback :tx_select, &block
self
end # tx_select(&block)
def tx_commit(&block)
@connection.send_frame(Protocol::Tx::Commit.encode(@id))
self.redefine_callback :tx_commit, &block
self
end # tx_commit(&block)
def tx_rollback(&block)
@connection.send_frame(Protocol::Tx::Rollback.encode(@id))
self.redefine_callback :tx_rollback, &block
self
end # tx_
self.handle(Protocol::Tx::SelectOk) do |connection, frame|
channel = connection.channels[frame.channel]
channel.exec_callback(:tx_select, frame.decode_payload)
end
self.handle(Protocol::Tx::CommitOk) do |connection, frame|
channel = connection.channels[frame.channel]
channel.exec_callback(:tx_commit, frame.decode_payload)
end
self.handle(Protocol::Tx::RollbackOk) do |connection, frame|
channel = connection.channels[frame.channel]
channel.exec_callback(:tx_rollback, frame.decode_payload)
end
.... ?
Confirms work with the channel.on_return callback so there's nothing
to add there right?
Cheers
Lee