Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a7b797d

Browse filesBrowse files
f0ff886fappkins
authored andcommitted
Fix never-returning xreadgroup case in example (#11)
By default `XGROUP CREATE` passes `$` as the ID which means "serve all IDs added from this point on". Due to that, the `XADD` directly above never gets served to the `XREADGROUP` command and this example will just hang the first time you run it waiting. Adding an explicit ID of 0 means we will get the previous message back in the `XREADGROUP`.
1 parent 207d415 commit a7b797d
Copy full SHA for a7b797d

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎examples/cpp_redis_client.cpp

Copy file name to clipboardExpand all lines: examples/cpp_redis_client.cpp
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ main(void) {
7070
#ifdef ENABLE_SESSION
7171

7272
client.xadd(session_name, "*", ins, replcmd);
73-
client.xgroup_create(session_name, group_name, replcmd);
73+
client.xgroup_create(session_name, group_name, "0", replcmd);
7474

7575
client.sync_commit();
7676

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.