# Golang Parallel For One Consumer?

**URL:** <https://community.solace.com/t/golang-parallel-for-one-consumer/1903>\
**Category:** Solace Event Broker\
**Tags:** queue, smf, solacepubsub, golang\
**Created:** [April 11, 2024, 6:14pm UTC](https://community.solace.com/t/golang-parallel-for-one-consumer/1903 "2024-04-11T18:14:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![klauszi](https://avatars.discourse-cdn.com/v4/letter/k/57b2e6/32.png) [@klauszi](https://community.solace.com/u/klauszi)\
**Post date:** [April 11, 2024, 6:14pm UTC](https://community.solace.com/t/golang-parallel-for-one-consumer/1903/1 "2024-04-11T18:14:22Z")

</div>

How can I increase the number of connections for a consumer using pubsubplus-go-client? We pass a callback to ReceiveAsync for a consumer via PersistentMessageReceiver, but only one message is processed at a time.

---

<div class="post-metadata">

**Author:** ![Aaron](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/aaron/32/843_2.png) [@Aaron](https://community.solace.com/u/Aaron)\
**Post date:** [April 15, 2024, 8:31am UTC](https://community.solace.com/t/golang-parallel-for-one-consumer/1903/2 "2024-04-15T08:31:38Z")

</div>

I don’t know Go, but this sounds like a threading issue. The API only has one thread to dispatch the messages to you. If I wanted to build a parallel-processing consumer in Java, I would receive the message via Async, and then place it onto an in-memory Queue/List for processing, and let the callback return right away. Then I’d have 3, 5, 10 threads that I’ve started trying to pull of that in-memory queue, processing the messages, and the ACKing the message once complete. [I made a video about this](https://www.youtube.com/watch?v=5ilYW2VqTqQ) . (just think of Persistent messages + ACKing instead of request/reply).

Or, do it the microservice way and just have many instances of your app running?
