Skip to content

Commit f251c03

Browse files
authored
Merge pull request #156 from viartemev/update-docs
Update docs
2 parents 175737b + b032908 commit f251c03

File tree

3 files changed

+11
-14
lines changed

3 files changed

+11
-14
lines changed

README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,20 @@ compile 'com.viartemev:the-white-rabbit:$version'
3737
##### - Async message publishing with confirmation:
3838
```kotlin
3939
connection.confirmChannel {
40-
publish {
41-
coroutineScope {
42-
(1..n).map { asyncPublishWithConfirm(createMessage("Hello #$it")) }.awaitAll()
43-
}
40+
publish {
41+
val messages = (1..n).map { createMessage("Hello #$it") }
42+
publishWithConfirmAsync(coroutineContext, messages).awaitAll()
4443
}
4544
}
4645
```
4746
or
4847
```kotlin
4948
connection.confirmChannel {
50-
publish {
51-
val messages = (1..n).map { createMessage("Hello #$it") }
52-
asyncPublishWithConfirm(messages).awaitAll()
49+
publish {
50+
coroutineScope {
51+
val messages = (1..n).map { createMessage("Hello #$it") }
52+
messages.map { async { publishWithConfirm(it) } }
53+
}
5354
}
5455
}
5556
```
@@ -59,7 +60,7 @@ Consume only n-messages:
5960
```kotlin
6061
connection.channel {
6162
consume(QUEUE_NAME, PREFETCH_COUNT) {
62-
(1..n).map { asyncConsumeWithConfirm({ println(it) }) }.awaitAll()
63+
(1..n).map { async { consumeMessageWithConfirm({ println(it) }) } }.awaitAll()
6364
}
6465
}
6566
```

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ configure(allprojects) { project ->
8282
}
8383

8484
configure(rootProject) {
85-
version = '0.0.4'
85+
version = '0.0.5'
8686

8787
apply plugin: "com.novoda.bintray-release"
8888
apply plugin: 'com.adarshr.test-logger'
@@ -103,7 +103,7 @@ configure(rootProject) {
103103
repoName = 'Maven'
104104
groupId = 'com.viartemev'
105105
artifactId = 'the-white-rabbit'
106-
publishVersion = '0.0.4'
106+
publishVersion = '0.0.5'
107107
desc = 'The White Rabbit is an asynchronous RabbitMQ library based on Kotlin coroutines'
108108
website = 'https://github.com/viartemev/the-white-rabbit'
109109
licences = ['MIT']

src/main/kotlin/com/viartemev/thewhiterabbit/exception/PublishException.kt

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)