You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Alessio Gottardo <ta...@yahoo.it.INVALID> on 2017/12/07 13:55:24 UTC

How to receive many messages in the same batch (Go Electron)

Hi guys,
I set up an AMQP link with just the path and a filter link this:```amqpConnection.Receiver(
            electron.Source(cgPath),
            electron.Filter(filterMap), )```
following this doc: https://godoc.org/qpid.apache.org/electron#LinkOption
However while running the Go app I've realised it was very slow in fetching messages, so I've added 2 more link options like this:
```amqpConnection.Receiver(
            electron.Source(cgPath),
            electron.Capacity(100),
            electron.Prefetch(true),
            electron.Filter(filterMap),
)
```but I don't see any improvement in the performance.I always receive approximately 10 messages every ~5 seconds from 4 parallel links.

I've tried to run the app with the environment variable `PN_TRACE_RAW=true`,but I am not sure on what should I look for to troubleshoot this issue.
I can see this at the moment:```[0x9fd490]:0 -> @attach(18) [name="<MY_CUSTOM_NAME>", handle=1, role=true, snd-settle-mode=0, rcv-settle-mode=0, source=@source(40) [address="<MY_CUSTOM_PATH>", durable=0, expiry-policy=:"link-detach", timeout=0, dynamic=false, filter={:string=@:"apache.org:selector-filter:string" "amqp.annotation.x-opt-offset > '<MY_CUSTOM_OFFSET>'"}], target=@target(41) [address="", durable=0, expiry-policy=:"link-detach", timeout=0, dynamic=false], initial-delivery-count=0, max-message-size=0]
[0x9fd490]:0 -> @flow(19) [next-incoming-id=1, incoming-window=2147483647, next-outgoing-id=1, outgoing-window=0, handle=1, delivery-count=0, link-credit=100, drain=false]
```

How could I fetch many messages at the same time in the same "round trip"?I need to process thousands of messages per seconds.
Thank youAlessio