Skip to content

Commit

Permalink
Remove confirm mode code
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Jenkins committed Dec 17, 2015
1 parent 0e7888b commit 16af79d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
16 changes: 0 additions & 16 deletions server/channel.go
Expand Up @@ -26,7 +26,6 @@ type Channel struct {
outgoing chan *amqp.WireFrame
conn *AMQPConnection
state uint8
confirmMode bool
currentMessage *amqp.Message
consumers map[string]*consumer.Consumer
consumerLock sync.Mutex
Expand Down Expand Up @@ -491,20 +490,11 @@ func (channel *Channel) setStateOpen() {
channel.state = CH_STATE_OPEN
}

func (channel *Channel) activateConfirmMode() {
channel.confirmMode = true
}

func (channel *Channel) startPublish(method *amqp.BasicPublish) error {
channel.currentMessage = amqp.NewMessage(method, channel.conn.id)
return nil
}

func (channel *Channel) nextConfirmId() uint64 {
channel.msgIndex++
return channel.msgIndex
}

func (channel *Channel) nextDeliveryTag() uint64 {
channel.deliveryLock.Lock()
channel.deliveryTag++
Expand Down Expand Up @@ -717,10 +707,6 @@ func (channel *Channel) handleContentBody(frame *amqp.WireFrame) *amqp.AMQPError
}

channel.currentMessage = nil
if channel.confirmMode {
channel.msgIndex += 1
channel.SendMethod(&amqp.BasicAck{channel.msgIndex, false})
}
return nil
}

Expand Down Expand Up @@ -763,8 +749,6 @@ func (channel *Channel) routeMethod(frame *amqp.WireFrame) *amqp.AMQPError {
return channel.basicRoute(methodFrame)
case classId == 90:
return channel.txRoute(methodFrame)
case classId == 85:
return channel.confirmRoute(methodFrame)
default:
return amqp.NewHardError(540, "Not implemented", classId, methodId)
}
Expand Down
22 changes: 0 additions & 22 deletions server/confirmMethods.go

This file was deleted.

0 comments on commit 16af79d

Please sign in to comment.