1
votes

I'm trying to understand the sequence of messages in a Storm Topology with Reliable Messaging using the Multilang protocol. I've been having issues where Storm reports an error saying "non-existent or already acked tuple".

Below is what I think the sequence should look like....

Can anybody confirm or correct me on the below sequence of messages ?

Topology: 1 Spout -> 1 BoltA -> 1 BoltB

Handshake omitted for clarity.

Storm —> Spout { command: next } end

Spout —> Storm { command: emit, Id:”42", tuple: [“Hello”, “World”] } end

Spout —> Stom {command : sync } end

Storm —> BoltA { id: “6524", tuple: [“Hello”, “World”] } end

BoltA —> Storm { command: ack, id: “6524” } end

BoltA —> Storm { command: emit, id: “43”, anchor: [“6524”], tuple [“Ciao”, “Mondo”] } end // Tuple has been processed by translating to Italian :-)

Storm -> BoltB { id: “7465”, tuple [“Ciao”, “Mondo”] } end

BoltB -> Storm { command: ack, id: “7465” } end

Storm -> Spout { command: ack, id: “42” } end // Storm lets the spout know that the branch is complete.

1

1 Answers

2
votes

In a bolt, if you want to anchor a tuple that you're emitting, to a tuple that you have received, you have to first emit the anchored tuple, before emitting the ack for the received tuple. So you should do:

Spout -> Storm emit 1
Storm -> Bolt deliver 1
Bolt -> emit 2, anchored to 1
Bolt -> ack 1