Problem setting caf.middleman.heartbeat-interval

24 views
Skip to first unread message

Eric Pederson

unread,
Jul 20, 2020, 9:40:18 PM7/20/20
to actor-framework
Dear CAF team:

Since we upgraded to 0.17.3 I am getting an error logged doing this:

    actorSystemConfig.set("middleman.heartbeat-interval", heartbeatIntervalMs);

heartbeatIntervalMs is a size_t but I've also tried with an int.

The error is

    *** failed to set config parameter middleman.heartbeat-interval: error(13, 'parser')

I looked at the docs and it appears that I should be using  "caf.middleman.heartbeat-interval" instead but I get a different error from that:

    *** failed to set config parameter caf.middleman.heartbeat-interval: invalid name

Please advise, thanks.
-- Eric  

Eric Pederson

unread,
Jul 25, 2020, 4:17:17 PM7/25/20
to actor-framework
I figured it out.

It's not caf.middleman.heartbeat-interval, because the new config format isn't used until 0.18.0

The fix is:

actorSystemConfig.set("middleman.heartbeat-interval",
     std::chrono::duration_cast<caf::timespan>(std::chrono::milliseconds(heartbeatIntervalMs)));

-- Eric

Dominik Charousset

unread,
Jul 26, 2020, 3:35:55 AM7/26/20
to actor-f...@googlegroups.com
> I figured it out.
>
> It's not caf.middleman.heartbeat-interval, because the new config format isn't used until 0.18.0
>
> The fix is:
>
> actorSystemConfig.set("middleman.heartbeat-interval",
> std::chrono::duration_cast<caf::timespan>(std::chrono::milliseconds(heartbeatIntervalMs)));

This gets you past the error, but it won’t do what you expect on 0.17.3 due to this bug: https://github.com/actor-framework/actor-framework/issues/1095.

This was fixed with 0.17.5: https://github.com/actor-framework/actor-framework/releases/tag/0.17.5. So your code will work after upgrading to a never CAF version.

Dominik

Eric Pederson

unread,
Jul 26, 2020, 3:41:10 PM7/26/20
to actor-framework
Thanks for the heads up.
Reply all
Reply to author
Forward
0 new messages