# Concurrent Data Processing In Elixir: Chapter 3 Errata

**URL:** <https://forum.devtalk.com/t/concurrent-data-processing-in-elixir-chapter-3-errata/7849>\
**Category:** PragProg Customers\
**Tags:** book-concurrent-data-processing-in-elixir\
**Created:** [13 March 2021 15:51 UTC](https://forum.devtalk.com/t/concurrent-data-processing-in-elixir-chapter-3-errata/7849 "2021-03-13T15:51:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chriseyre2000](https://forum.devtalk.com/user_avatar/forum.devtalk.com/chriseyre2000/32/1164_2.png) [@chriseyre2000](https://forum.devtalk.com/u/chriseyre2000)\
**Post date:** [13 March 2021 15:51 UTC](https://forum.devtalk.com/t/concurrent-data-processing-in-elixir-chapter-3-errata/7849/1 "2021-03-13T15:51:04Z")

</div>

Towards the end of Chapter 3 (B2) the via function is implemented as:  
def via(id) do  
{{:via, Registry, {ProducerConsumerRegistry, id}}, []}  
end

However the app fails to start unless you change this to:

def via(id) do  
{:via, Registry, {ProducerConsumerRegistry, id}}  
end

Here is the code that I entered as specified in the book: [GitHub - chriseyre2000/scraper: Sample app from chapter 3 of Concurrent Data Processing In Elixir](https://github.com/chriseyre2000/scraper)

I did restart this chapter from B1 just in case something had changed/been fixed.

---

<div class="post-metadata">

**Author:** ![svilen](https://forum.devtalk.com/user_avatar/forum.devtalk.com/svilen/32/529_2.png) [@svilen](https://forum.devtalk.com/u/svilen)\
**Post date:** [14 March 2021 19:51 UTC](https://forum.devtalk.com/t/concurrent-data-processing-in-elixir-chapter-3-errata/7849/2 "2021-03-14T19:51:56Z")

</div>

Thank you for reporting this Christopher! And thanks for sharing the code, it was super helpful.

Looks like I made a mistake when introducing this. Rather than using `{{:via, Registry, {ProducerConsumerRegistry, id}}, []}` the book should ask you to modify `page_consumer_supervisor.ex` and update the `subscribe_to` options like so:

```auto
    opts = [
      strategy: :one_for_one,
      subscribe_to: [
        {OnlinePageProducerConsumer.via("online_page_producer_consumer_1"), []},
        {OnlinePageProducerConsumer.via("online_page_producer_consumer_2"), []}
      ]
    ]

```

However, you can still keep the code that you have at the moment. You’ll just get a warning message like this:

```auto
[warn] :subscribe_to value with type {:via, module(), term()} is deprecated

```

I’ll make sure this is fixed in the next version 👍
