Skip to content

Commit

Permalink
Fix snapshot version and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
drosowski authored and rubengees committed Aug 24, 2023
1 parent bd9e01e commit d53913d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,16 @@ repositories {
}
dependencies {
implementation "de.smartsquare:socket-io-redis-emitter:0.11.3"
implementation "de.smartsquare:socket-io-redis-emitter:0.11.3"
}
```

This library comes with a default implementation for both jedis and lettuce.

### Emit Cheatsheet

When using Jedis:
```kotlin
val jedisConnection = jedisConnectionFactory.connection as JedisConnection
val emitter = Emitter(JedisPublisher(jedisConnection.jedis))
val emitter = Emitter(JedisPublisher(jedis))

// Publishing a simple text message
emitter.broadcast(topic = "something", value = "Hello World!")
Expand Down Expand Up @@ -83,6 +81,18 @@ The [example](example) directory contains a working docker-compose setup which c
using `docker-compose --compatibility up`. The setup contains one redis instance, one java publisher, three
socket.io-servers and three consuming socket.io-clients.

### Usage in Spring Boot and Jedis

Jedis:
```kotlin
@Bean
fun emitter(redisConnectionFactory: RedisConnectionFactory): Emitter {
val jedisConnectionFactory = redisConnectionFactory as JedisConnectionFactory
val jedisConnection = jedisConnectionFactory.connection as JedisConnection
return Emitter(JedisPublisher(jedisConnection.jedis))
}
```

## :warning: Limitations

- The room and namespaces have not been tested yet.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ plugins {
}

group = "de.smartsquare"
version = System.getenv("GITHUB_VERSION") ?: "1.0.1-SNAPSHOT"
version = System.getenv("GITHUB_VERSION") ?: "1.0.0-SNAPSHOT"
description = "Library to emit socket.io notifications via redis."

repositories {
Expand Down

0 comments on commit d53913d

Please sign in to comment.