Skip to content

Commit 3655e6f

Browse files
committed
scaling tweaks
1 parent 48d7086 commit 3655e6f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

samples/bluesky-sentiment-analysis/consumer/consumer/src/main/java/com/redis/Main.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,11 @@ public void run() throws IOException, InterruptedException {
9191

9292
String key = "com.redis.bskysentimentapi.documents.Post:" + post.getCid();
9393
Set<String> hashTags = new HashSet<>(Arrays.asList(post.getHashTags()));
94+
if(hashTags.contains("nsfw"))
95+
{
96+
consumerGroup.acknowledge(new AckMessage(entry));
97+
continue;
98+
}
9499

95100
if(hashTags.isEmpty()){
96101
Map<String,Object> postMap = Map.of(

samples/bluesky-sentiment-analysis/start-containers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
./gradlew clean bootJar
44
docker compose build
5-
docker compose up --scale consumer=3
5+
docker compose up --scale consumer=5

0 commit comments

Comments
 (0)