gllambi
gllambi

Reputation: 686

Aggregator doesn't release messages from redis message store

He are using an aggregator with redis and found some messages aren't cleaned from redis. We query the redis message store using SI classes and found that no messages where found but I query redis from the command line and there are still messages there.

this is my simple test to query redis messages where group size is zero:

  @Autowired
  private RedisMessageStore loyaltyAggregatorRedisMessageStore;

  @Test
  public void testMessageStoreGroups() {
    MessageGroup group = loyaltyAggregatorRedisMessageStore.getMessageGroup("MESSAGE_GROUP_true");
    System.out.println(group.size());
}

but when I query Redis, I have this output:

1) "MESSAGE_8fdf96b5-ea0e-45a5-a8db-2b245fc909aa"
...
105) "MESSAGE_2772c17f-539c-c63e-1072-a5e46bb8f13d"
106) "MESSAGE_e42960e9-1801-5376-bbbc-897ad724e0ba"
107) "MESSAGE_a23c9e65-8b0e-4ee4-a3b3-4f90bcd88851"
108) "MESSAGE_1558ec12-a1dc-1afd-c8ea-d8f79ccdbb21"
109) "MESSAGE_GROUP_true"
110) "MESSAGE_a123b075-3f17-4140-d9c3-115295330b6a"
111) "MESSAGE_ba07d76f-641e-7d38-d942-cdccd4b6aa0e"
112) "MESSAGE_fe77a8aa-e273-d202-2c3f-6be7a7376153"
113) "MESSAGE_d89872b0-9b7f-5a94-24a4-62c577b04d37"
114) "MESSAGE_cf935ae2-5813-5636-79ef-4381e0da2982"
115) "MESSAGE_8435ce3f-8b89-6223-1713-72e221382cdd"
116) "MESSAGE_e27daf70-795b-b4db-a262-e94450b88d41"
117) "MESSAGE_a06ad5a9-fafb-b882-747a-31b62cd13425"
118) "MESSAGE_04fe2ae4-9bde-91e8-f136-39f7e8d225f7"
119) "MESSAGE_a13db3bb-246a-3f1a-ed08-1431be324766"
120) "MESSAGE_8423e0fd-0eda-5dcc-3fd9-7b428689c02e"

and more

any idea of what could cause this issue?

thanks in advance Guzman

Upvotes: 1

Views: 404

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121272

Show, please how you query Redis directly.

BTW RedisMessageStore does it like this:

AbstractKeyValueMessageStore:

Object mgm = this.doRetrieve(MESSAGE_GROUP_KEY_PREFIX + groupId);

Where MESSAGE_GROUP_KEY_PREFIX is MESSAGE_GROUP_. So, looks like you overdid quering it like this "MESSAGE_GROUP_true".

There is something wrong in the other place.

If messages would remain in Redis our test servers would fall already for a long time ago...

Upvotes: 1

Related Questions