Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 1012 lines (595 sloc) 28.878 kb
f649a9b @michaelklishin Update change log
authored
1 ## Changes between Langohr 3.1.x and 3.2.0
2
ff48491 @michaelklishin Update change log
authored
3 ### Authentication Mechanism Support
4
5 Langohr now converts `:authentication-mechanism` option to a SASL
6 mechanism. Two values are supported:
7
8 * `"PLAIN"`
9 * `"EXTERNAL"`
10
11 Contributed by Tap.
12
0bb324c @michaelklishin Update change log
authored
13 ### RabbitMQ Java Client Upgrade
14
15 RabbitMQ Java client dependency has been updated to `3.5.x`.
f649a9b @michaelklishin Update change log
authored
16
17
03d905d @michaelklishin Update change log
authored
18 ## Changes between Langohr 3.0.0 and 3.1.0
19
55231e9 @michaelklishin Update change log
authored
20 ### RabbitMQ Java Client Upgrade
21
22 RabbitMQ Java client dependency has been updated to `3.4.4`.
23
24 It includes an important binding recovery bug fix.
25
4a274f2 @michaelklishin Update change log
authored
26 ### clj-http Upgrade
27
28 clj-http dependency has been updated to `1.0.1`.
29
30 ### Cheshire Upgrade
31
32 Cheshire dependency has been updated to `5.4.0`.
33
34
03d905d @michaelklishin Update change log
authored
35 ### langohr.consumers/blocking-subscribe No Longer Fails
36
37 `langohr.consumers/blocking-subscribe` no longer fails with a function arity
38 exception.
39
40 GH issue: [#65](https://github.com/michaelklishin/langohr/issues/65).
41
42
43
44
5035176 @michaelklishin Update change log
authored
45 ## Changes between Langohr 2.11.x and 3.0.0
46
9aa1151 @michaelklishin Switch all pseudo-kwarg options to maps
authored
47 ### Options as Maps
48
49 Functions that take options now require a proper Clojure map instead of
50 pseudo keyword arguments:
51
52 ``` clojure
c93a7bc @michaelklishin Typo
authored
53 ;; in Langohr 2.x
9aa1151 @michaelklishin Switch all pseudo-kwarg options to maps
authored
54
55 (lq/declare ch q :durable true)
56 (lhcons/subscribe ch q (fn [_ _ _])
57 :consumer-tag ctag :handle-cancel-ok (fn [_]))
58 (lb/publish ch "" q "a message" :mandatory true)
59
c93a7bc @michaelklishin Typo
authored
60 ;; in Langohr 3.x
9aa1151 @michaelklishin Switch all pseudo-kwarg options to maps
authored
61 (lq/declare ch q {:durable true})
62 (lhcons/subscribe ch q (fn [_ _ _])
63 {:consumer-tag ctag :handle-cancel-ok (fn [_])})
64 (lb/publish ch "" q "a message" {:mandatory true})
65 ```
66
67
1beb5db @michaelklishin Update change log
authored
68 ### JDK 8 Compatibility
69
70 Langohr test suite now passes on JDK 8 (previously there was 1 failure
71 in recovery test).
72
95645c6 @michaelklishin Change log updates
authored
73 GH issue: [#54](https://github.com/michaelklishin/langohr/issues/54).
74
1beb5db @michaelklishin Update change log
authored
75
76 ### Connection Recovery Performed by Java Client
77
78 Langohr no longer implements automatic connection recovery
79 of its own. The feature is still there and there should be no
80 behaviour changes but the functionality has now been pushed
81 "upstream" in the Java client, so Langohr now relies on it
82 to do all the work.
83
e4000f4 @michaelklishin Update change log
authored
84 There is two public API changes:
85
86 * `com.novemberain.langohr.Recoverable` is gone, `langohr.core/on-recovery`
87 now uses `com.rabbitmq.client.Recoverable` instead in its signature.
88
89 * Server-named queues will change after recovery. Use `langohr.core/on-queue-recovery`
90 to register a listener for queue name change.
1beb5db @michaelklishin Update change log
authored
91
95645c6 @michaelklishin Change log updates
authored
92 GH issue: [#58](https://github.com/michaelklishin/langohr/issues/58).
93
1beb5db @michaelklishin Update change log
authored
94
5035176 @michaelklishin Update change log
authored
95 ### RabbitMQ Java Client Upgrade
96
54ca842 @michaelklishin Update change log
authored
97 RabbitMQ Java client dependency has been updated to `3.4.2`.
101c365 @michaelklishin Update change log
authored
98
e17b589 @michaelklishin Update change log
authored
99 ### Custom Exception Handlers
100
101 `langohr.core/exception-handler` is a function that customizes
102 default exception handler RabbitMQ Java client uses:
103
104 ``` clojure
105 (require '[langohr.core :as rmq])
106
855a291 @michaelklishin Correct change log example
authored
107 (let [(rmq/exception-handler :handle-consumer-exception-fn (fn [ch ex consumer
108 consumer-tag method-name]
109 ))]
e17b589 @michaelklishin Update change log
authored
110 )
111 ```
112
695dd1d @michaelklishin Update change log
authored
113 Valid keys are:
114
115 * `:handle-connection-exception-fn`
116 * `:handle-return-listener-exception-fn`
117 * `:handle-flow-listener-exception-fn`
118 * `:handle-confirm-listener-exception-fn`
119 * `:handle-blocked-listener-exception-fn`
120 * `:handle-consumer-exception-fn`
121 * `:handle-connection-recovery-exception-fn`
122 * `:handle-channel-recovery-exception-fn`
123 * `:handle-topology-recovery-exception-fn`
124
e17b589 @michaelklishin Update change log
authored
125 GH issue: [#47](https://github.com/michaelklishin/langohr/issues/47).
126
a1c837e @michaelklishin Update change log
authored
127
295915a @michaelklishin Ditto
authored
128 ### Clojure 1.7 Support
129
130 Clojure 1.7-specific compilation issues and warnings were eliminated.
131
820998d @michaelklishin Change log updates
authored
132 ### clj-http Upgrade
133
134 clj-http dependency has been updated to `1.0.0`.
135
136 ### ClojureWerkz Support Upgrade
137
138 `clojurewerkz/support` dependency has been updated to `1.1.0`.
139
140
101c365 @michaelklishin Update change log
authored
141 ### langohr.core/version is Removed
142
143 `langohr.core/version` was removed.
144
145
7e6e361 @michaelklishin Change log update
authored
146 ## Changes between Langohr 2.10.x and 2.11.0
147
148 ### Multi-Host Support In langohr.core/connect
149
150 `langohr.core/connect` now supports `:hosts` as well as `:host`.
151 The hosts provided will be iterated over, the first reachable host
152 will be used.
153
154 Example:
155
156 ``` clojure
157 (require '[langohr.core :as rmq])
158
159 (rmq/connect {:hosts #{"192.168.1.2" "192.168.1.3"}})
f798899 @michaelklishin Update change log
authored
160 ;; uses port 5688 for both hosts
161 (rmq/connect {:hosts #{"192.168.1.2" "192.168.1.3"} :port 5688})
162 ;; uses multiple host/port pairs
163 (rmq/connect {:hosts #{["192.168.1.2" 5688] ["192.168.1.3" 5689]}})
7e6e361 @michaelklishin Change log update
authored
164 ```
165
166
465e6c5 @michaelklishin Change log update
authored
167 ## Changes between Langohr 2.9.x and 2.10.0
168
4f1d1ff @michaelklishin Change log updates
authored
169 ### Retries for all IOExceptions During Recovery
465e6c5 @michaelklishin Change log update
authored
170
4f1d1ff @michaelklishin Change log updates
authored
171 All IOException subclasses thrown during connection recovery attempts
172 will now be retried.
173
174 Contributed by Paul Bellamy (Xively).
175
176 ### RabbitMQ Java Client Upgrade
177
178 RabbitMQ Java client dependency has been updated to `3.3.1`.
465e6c5 @michaelklishin Change log update
authored
179
180
cfc465f @michaelklishin Update change log
authored
181 ## Changes between Langohr 2.8.x and 2.9.0
182
749675f @michaelklishin Change log updates
authored
183 ### Configurable Default and Per-Operation Options in HTTP API Client
2cf2d3e @michaelklishin Update change log
authored
184
185 Most HTTP API client functions now have an additional optional arguments,
186 which is a map of options passed to `clj-http` functions. This lets you fine
187 tune certain HTTP requests as needed.
188
189 In addition, `langohr.http/connect!` now accepts one more argument which serves
190 as default HTTP client options merged with the options provided per `langohr.http`
749675f @michaelklishin Change log updates
authored
191 function call:
192
193 ``` clojure
194 (require '[langohr.http :as hc])
195
196 ;; non-20x/30x statuses will now throw exceptions
197 (hc/connect! "http://127.0.0.1:15673" "guest" "guest" {:throw-exceptions true})
198
199 ;; disable throwing exceptions for an individual operation,
200 ;; because 404 is an expected HTTP response in this case
201 (hc/vhost-exists? "myapp-production" {:throw-exceptions false})
202 ;= false
203
204 ;; disabling peer verification for HTTPS requests
205 (hc/connect! "http://127.0.0.1:15673" "guest" "guest" {:insecure? true})
206 ```
2cf2d3e @michaelklishin Update change log
authored
207
52748b6 @michaelklishin Change log update
authored
208 ### Thread Factory Customization
209
210 It is now possible to customize a `java.util.concurrent.ThreadFactory`
211 used by Langohr connections. The factory will be used to instantiate
212 all threads created by the client under the hood.
213
214 The primary use case for this is running on Google App Engine which
215 prohibits direct thread instantiation and requires apps to use
216 thread manager (or thread factory) from GAE SDK instead.
217
99fe169 @michaelklishin Explain
authored
218 To provide a custom thread factory, pass it as `:thread-factory` to
219 `langohr.core/connect`. To reify a thread factory with a Clojure function,
220 use `langohr.core/thread-factory-from`:
221
222 ``` clojure
223 (require '[langohr.core :as lc])
224
225 (let [tf (lc/thread-factory-from
226 (fn [^Runnable r]
227 (Thread. r)))]
228 (lc/connect {:thread-factory tf}))
229 ```
230
cfc465f @michaelklishin Update change log
authored
231 ### com.rabbitmq.client.TopologyRecoveryException is Used
232
233 Langohr now uses com.rabbitmq.client.TopologyRecoveryException instead of
234 reinventing its own exception to indicate topology recovery failure.
235
236 ### RabbitMQ Java Client Compatibility
237
238 A few RabbitMQ Java client interface compatibility issues are resolved.
239
240
57129ba @michaelklishin Update change log
authored
241 ## Changes between Langohr 2.7.x and 2.8.0
242
a6926cb @michaelklishin Ditto
authored
243 ### Client-side Channel Flow Removed
244
245 `langohr.channel/flow` and `langohr.channel/flow?` were removed.
246 Client-side flow control has been deprecated for a while and was removed
247 in RabbitMQ Java client 3.3.0.
248
85e3485 @michaelklishin Update change log
authored
249 ### RabbitMQ Java Client Upgrade
250
251 RabbitMQ Java client dependency has been updated to `3.3.0`.
252
57371d9 @michaelklishin Update change log
authored
253 ### Clojure 1.6 By Default
254
255 Langohr now depends on `org.clojure/clojure` version `1.6.0`. It is
256 still compatible with Clojure 1.4 and if your `project.clj` depends on
257 a different version, it will be used, but 1.6 is the default now.
258
259 We encourage all users to upgrade to 1.6, it is a drop-in replacement
260 for the majority of projects out there.
261
57129ba @michaelklishin Update change log
authored
262 ### langohr.http/protocol-ports
263
264 `langohr.http/protocol-ports` is a new function that returns
265 a map of protocol names to protocol ports. The protocols
266 are listed with `langohr.http/list-enabled-protocols`.
267
268
2faf658 @michaelklishin Correct change log
authored
269 ## Changes between Langohr 2.6.x and 2.7.1
8c1e489 @michaelklishin Update change log
authored
270
271 ### langohr.http/list-enabled-protocols
272
273 `langohr.http/list-enabled-protocols` is a new function that lists
274 the protocols a RabbitMQ installation supports, e.g. `"amqp"` or `"mqtt"`.
275 Note that this currently does not include WebSTOMP (due to certain technical decisions
276 in RabbitMQ Web STOMP plugin).
277
278
274fc38 @michaelklishin Update change log
authored
279 ## Changes between Langohr 2.5.x and 2.6.0
280
ab5c01b @michaelklishin Update change log
authored
281 ### langohr.http/list-connections-from, /close-connections-from
282
283 `langohr.http/list-connections-from` and `langohr.http/close-connections-from`
284 are two new functions that list and close connections for a given username,
285 respectively:
286
287 ``` clojure
288 (require '[langohr.http :as hc])
289
290 (hc/list-connections-from "guest")
291 ;= a list of connections with username "guest"
292
293 ;; closes all connections from "guest"
294 (hc/close-connections-from "guest")
295 ```
296
274fc38 @michaelklishin Update change log
authored
297 ### clj-http Upgrade
298
299 clj-http dependency has been updated to `0.9.0`.
300
301
eb7d51d @michaelklishin Typo
authored
302 ## Changes between Langohr 2.3.x and 2.5.0
dd6687b @michaelklishin Update change log
authored
303
d1b61ee @michaelklishin Update change log
authored
304 ### langohr.http/declare-user Renamed
305
306 `langohr.http/declare-user` was renamed to `langohr.http/set-user`.
307
14e027f @michaelklishin Update change log
authored
308 ### langohr.http/declare-policy Renamed
309
310 `langohr.http/declare-policy` was renamed to `langohr.http/set-policy`.
311
29ed229 @michaelklishin Update change log
authored
312 ### langohr.http/declare-permissions Renamed
313
314 `langohr.http/declare-permissions` was renamed to `langohr.http/set-permissions`.
315
d43f705 @michaelklishin Update change log
authored
316 ### langohr.http/declare-user Renamed
317
318 `langohr.http/declare-user` was renamed to `langohr.http/add-user`.
319
a7398bd @michaelklishin Typos
authored
320 ### langohr.http/vhost-exists?
01b7232 @michaelklishin Update change log
authored
321
a7398bd @michaelklishin Typos
authored
322 `langohr.http/vhost-exists?` is a new function that returns true if provided
01b7232 @michaelklishin Update change log
authored
323 vhost exists:
324
325 ``` clojure
326 (require '[langohr.http :as hc])
327
328 (hc/vhost-exists? "killer-app-dev")
329 ```
330
a7398bd @michaelklishin Typos
authored
331 ### langohr.http/user-exists?
dd6687b @michaelklishin Update change log
authored
332
a7398bd @michaelklishin Typos
authored
333 `langohr.http/user-exists?` is a new function that returns true if provided
dd6687b @michaelklishin Update change log
authored
334 user exists:
335
336 ``` clojure
337 (require '[langohr.http :as hc])
338
339 (hc/user-exists? "monitoring")
340 ```
341
e1d506a @michaelklishin Update change log
authored
342 ### RabbitMQ Java Client Upgrade
343
344 RabbitMQ Java client dependency has been updated to `3.2.4`.
345
6209288 @michaelklishin Update change log
authored
346 ### clj-http Upgrade
347
348 clj-http dependency has been updated to `0.7.9`.
349
f7ffca7 @michaelklishin Update change log
authored
350 ### Topology Recovery Default
351
352 `:automatically-recover-topology` default is now `true`, as listed in
353 documentation.
354
355 Contributed by Ilya Ivanov.
356
217526c @michaelklishin Update change log
authored
357 ### Deprecations
358
359 `langohr.core/automatically-recover?` is deprecated
360
361 Use `langohr.core/automatic-recovery-enabled?` instead.
362
363
a4f1de7 @michaelklishin Update change log
authored
364 ## Changes between Langohr 2.2.0 and 2.3.0
365
9ea308f @michaelklishin Update change log
authored
366 ### Recovery Predicates
367
368 `langohr.core/automatic-recovery-enabled?` and `langohr.core/automatic-topology-recovery-enabled?`
369 are new predicate functions that return `true` if automatic connection and topology recovery,
370 respectively, is enabled for the provided connection.
371
12fada0 @michaelklishin Update change log
authored
372 ### Topology Recovery Fails Quickly
373
374 Topology recovery now fails quickly, raising
375 `com.novemberain.langohr.recovery.TopologyRecoveryException` which
376 carries the original (cause) exception.
377
378 Previously if recovery of an entity failed, other entities were still
379 recovered. Now topology recovery fails on the first exception,
380 making issues more visible.
381
382 ### Automatic Recovery Can Be Disabled By Passing `nil`
383
384 Automatic recovery options now respect both `false` and `nil` values.
385
a4f1de7 @michaelklishin Update change log
authored
386 ### Automatic Topology Recovery Doesn't Kick In When Disabled
387
388 Automatic topology recovery no longer kicks in when it is disabled.
389
390
89a5b27 @michaelklishin Update change log
authored
391 ## Changes between Langohr 2.1.0 and 2.2.0
392
393 ### Automatic Topology Recovery Tracks Entities Per Connection
394
395 Automatic topology recovery now tracks entities (exchanges,
396 queues, bindings, and consumers) per connection. This makes
397 it possible to, say, declare an exchange on one channel, delete
398 it on another channel and not have it reappear.
399
400 Suggested by Jonathan Halterman.
401
402
d644662 @michaelklishin Change log update
authored
403 ### RabbitMQ Java Client Upgrade
404
405 RabbitMQ Java client dependency has been updated to `3.2.2`.
406
c3b3864 @michaelklishin Ditto
authored
407 ### clj-http Upgrade
408
409 clj-http dependency has been updated to `0.7.8`.
410
6515166 @michaelklishin Ditto
authored
411 ### Cheshire Upgrade
412
413 Cheshire dependency has been updated to `5.3.1`.
414
d644662 @michaelklishin Change log update
authored
415
89a5b27 @michaelklishin Update change log
authored
416
e97734d @michaelklishin Update change log
authored
417 ## Changes between Langohr 2.0.0 and 2.1.0
418
f1662b0 @michaelklishin Change log update
authored
419 ### Full Channel State Recovery
420
421 Channel recovery now involves recovery of publisher confirms and
422 transaction modes.
423
e97734d @michaelklishin Update change log
authored
424 ### No Zombie Bindings After Recovery
425
426 Langohr now correctly removes bindings from the list of
427 bindings to recover when a binding is removed using `queue.unbind`
428 or `exchange.unbind`.
429
430
c31e62b @michaelklishin Next release will be 2.0
authored
431 ## Changes between Langohr 1.7.0 and 2.0.0
ebcfd9b @michaelklishin Change log updates
authored
432
905b15a @michaelklishin Brief change log update
authored
433 ### Topology (Queues, Exchanges, Bindings, Consumers) Recovery
434
435 Connection recovery now supports entity recovery. Queues, exchanges,
436 bindings and consumers can be recovered automatically after channel
9180089 @michaelklishin Wording
authored
437 recovery. This feature is enabled by default and can be disabled
3e4714d @michaelklishin Update change log
authored
438 by setting the `:automatically-recover-topology` option to `false`.
905b15a @michaelklishin Brief change log update
authored
439
1e1014b @michaelklishin Update change log
authored
440 ### :requested-channel-max Connection Option
441
442 `:requested-channel-max` is a new option accepted by
443 `langohr.core/connect` that configures how many channels
444 this connection may have. The limit is enforced on the client
445 side. `0` means "no limit" and is the default.
446
447 Contributed by Glophindale.
448
5717523 @michaelklishin Update change log
authored
449 ### langohr.queue/empty?
450
451 `langohr.queue/empty?` is a new function that returns true if provided
452 queue is empty (has 0 messages ready):
453
454 ``` clojure
455 (require '[langohr.queue :as lq])
456
457 (lq/empty? ch "a.queue")
458 ;= true
459 ```
460
461
ebcfd9b @michaelklishin Change log updates
authored
462 ### langohr.core/add-shutdown-listener
463
464 `langohr.core/add-shutdown-listener` is a helper function that
465 reifies and registers a shutdown signal listener on a connection.
466
467 ### langohr.core/add-blocked-listener
468
469 `langohr.core/add-blocked-listener` is a helper function that
470 reifies and registers a `connection.blocked` and `connection.unblocked`
471 listener on a connection.
472
473
474
b66b8e3 @michaelklishin Change log update
authored
475 ## Changes between Langohr 1.6.0 and 1.7.0
476
477 ### Retries for Connection Recovery
478
479 Langohr will now make sure to handle network I/O-related exceptions
480 during recovery and reconnect every N seconds.
230d07b @michaelklishin Change log update
authored
481
482 ### RabbitMQ Java Client Upgrade
483
484 RabbitMQ Java client dependency has been updated to `3.2.1`.
485
486
d3a874f Use byte[] coercion from Support
Michael Klishin authored
487 ## Changes between Langohr 1.5.0 and 1.6.0
488
c6ab3d3 Update change log
Michael Klishin authored
489 ### RabbitMQ Java Client Upgrade
490
491 RabbitMQ Java client dependency has been updated to `3.2.0`.
492
493
e180cce @michaelklishin Change log update
authored
494 ### Automatic Recovery Improvements
495
496 Connections will only be recovered if shutdown was not application-initiated.
497
498 Contributed by Stephen Dienst.
499
500
d3a874f Use byte[] coercion from Support
Michael Klishin authored
501 ### Support Update
502
c4eff82 @michaelklishin Change log update
authored
503 Langohr now depends on ClojureWerkz Support `0.20.0`.
d3a874f Use byte[] coercion from Support
Michael Klishin authored
504
505 `langohr.conversion/BytePayload` and `langohr.conversion/to-bytes`
506 are replaced by `clojurewerkz.support.bytes/ByteSource` and
507 `clojurewerkz.support.bytes/to-byte-array`, respectively.
508
509
59bae2d Change log update
Michael Klishin authored
510 ## Changes between Langohr 1.4.0 and 1.5.0
511
dfc7862 Change log update
Michael Klishin authored
512 ### Automatic Recovery Improvements
513
514 Automatic recovery of channels that are created without an explicit
515 number now works correctly.
516
517 Contributed by Joe Freeman.
518
519
520 ### clj-http Upgrade
521
522 clj-http dependency has been updated to `0.7.6`.
523
524
525 ### Clojure 1.3 is No Longer Supported
526
527 Langohr requires Clojure 1.4+ as of this version.
528
529
9d556c2 More, even
Michael Klishin authored
530 ### More Convenient Publisher Confirms Support
53cd314 Change log update
Michael Klishin authored
531
532 `langohr.confirm/wait-for-confirms` is a new function that
533 waits until all outstanding confirms for messages
534 published on the given channel arrive. It optionally
535 takes a timeout:
536
537 ``` clojure
538 (langohr.confirm/wait-for-confirms ch)
539 ;; wait up to 200 milliseconds
540 (langohr.confirm/wait-for-confirms ch 200)
541 ```
542
543
59bae2d Change log update
Michael Klishin authored
544 ### Automatic Recovery Fix
545
546 Automatic recovery now can be enabled without causing an exception.
547
548
218cec6 Change log update
Michael Klishin authored
549 ## Changes between Langohr 1.3.0 and 1.4.0
550
551 ### Network Recovery Callbacks on Connections and Channels
552
553 They can be used to re-declare necessary entities using `langohr.core/on-recovery`:
554
555 ``` clojure
556 (langohr.core/on-recovery conn (fn [conn] (comment ...)))
557
558 (langohr.core/on-recovery ch (fn [ch] (comment ...)))
559 ```
560
561 Unlike OO clients that represent queues and
562 exchanges as objects, Langohr cannot be more
563 aggressive about redeclaring entities during
564 connection recovery.
565
566
f702c3f Change log update
Michael Klishin authored
567 ## Changes between Langohr 1.2.0 and 1.3.0
568
569 ## Re-introduce langohr.consumers/create-queueing
570
571 The function creates a `QueueingConsumer` instance and is very similar
572 to `langohr.consumers/create-default` in purpose.
573
574 Sometimes combining a queueing consumer with
575 `langohr.consumers/deliveries-seq` is the best way to express a
576 problem.
577
578 ### Rename langoh.consumers/consumers-seq to langoh.consumers/deliveries-seq, make it public
579
580 `langoh.consumers/deliveries-seq` is a function that turns a `QueueingConsumer` instance
581 into a lazy sequence of deliveries.
582
583 ### Use :executor During Connection Recovery
584
585 Connection recovery after network failure will now respect the `:executor`
586 option.
587
218cec6 Change log update
Michael Klishin authored
588
42e636d Change log update
Michael Klishin authored
589 ## Changes between Langohr 1.1.0 and 1.2.0
590
591 ### Langohr Again Uses RabbitMQ Java Client Interfaces
592
593 Langohr's implementation of connection and channel now implements
594 RabbitMQ Java client's interfaces for connection and channel.
595
596
597
ff878b3 Change log update
Michael Klishin authored
598 ## Changes between Langohr 1.0.0 and 1.1.0
599
56ae665 Change log update
Michael Klishin authored
600 ### Extended HTTP API Support
601
602 `langohr.http` now provides more complete coverage of the RabbitMQ HTTP API.
603
604 Contributed by Steffen Dienst.
605
a7f2654 Change log update
Michael Klishin authored
606 ### langohr.consumers/subscribe Options In Line with Docs
607
608 The documentation says to use function handler keys ending in
609 "-fn", but this code currently only recognizes the old form. This
610 commit ensures that all keys that are used within
611 `langohr.consumers/subscribe` can be used as a parameter.
612
b9e26d0 Attribute Steffen Dienst
Michael Klishin authored
613 Contributed by Steffen Dienst.
614
b1c3867 Change log update
Michael Klishin authored
615 ### langohr.shutdown/sort-error? => langohr.shutdown/soft-error?
616
617 `langohr.shutdown/soft-error?` is now correctly named.
618
619 Contributed by Ralf Schmitt.
620
2f99588 Change log update
Michael Klishin authored
621 ### langohr.core/connect-to-first-available is Removed
622
623 `langohr.core/connect-to-first-available` is removed. A better failover functionality
624 will be available in future versions.
625
ff878b3 Change log update
Michael Klishin authored
626 ### RabbitMQ Java Client Upgrade
627
628 RabbitMQ Java client dependency has been updated to `3.1.3`.
629
630 ### clj-http Upgrade
631
632 clj-http dependency has been updated to `0.7.4`.
633
634 ### Cheshire Upgrade
635
636 Cheshire dependency has been updated to `5.2.0`.
637
638
639
640
7a0d5f8 1.0.0
Michael Klishin authored
641 ## Changes between Langohr 1.0.0-beta13 and 1.0.0
55e4419 @michaelklishin Depend on Clojure 1.5
authored
642
3dab468 Change log update
Michael Klishin authored
643 ### Queueing Consumers
644
645 In its early days, Langohr has been using `QueueingConsumer` for `langohr.queue/subscribe`.
646 It was later replaced by a `DefaultConsumer` implementation.
647
648 The key difference between the two is that
649
650 * `QueueingConsumer` blocks the caller
651 * with `QueueingConsumer`, deliveries are typically processed in the same thread
652
653 This implementation has pros and cons. As such, an implementation on top of
654 `QueueingConsumer` is back with `langohr.consumers/blocking-subscribe` which is
655 identical to `langohr.consumers/subscribe` in the signature but blocks the caller.
656
657 In addition, `langohr.consumers/ack-unless-exception` is a new convenience function
658 that takes a delivery handler fn and will return a new function
659 that explicitly acks deliveries unless an exception was raised by the original handler:
660
661 ``` clojure
662 (require '[langohr.consumers :as lc])
663 (require '[langohr.basic :as lb])
664
665 (let [f (fn [metadata payload]
666 (comment "Message delivery handler"))
667 f' (lc/ack-unless-exception f)]
668 (lb/consume ch q (lc/create-default :handle-delivery-fn f'))
669 ```
670
671 Contributed by Ian Eure.
672
2884120 Introduce langohr.shutdown, references #16
Michael Klishin authored
673 ### Shutdown Signal Functions
674
675 Several new functions in `langohr.shutdown` aid with shutdown signals:
676
677 * `langohr.shutdown/initiated-by-application?`
678 * `langohr.shutdown/initiated-by-broker?`
679 * `langohr.shutdown/reason-of`
680 * `langohr.shutdown/channel-of`
681 * `langohr.shutdown/connection-of`
682
55e4419 @michaelklishin Depend on Clojure 1.5
authored
683 ### Clojure 1.5 By Default
684
685 Langohr now depends on `org.clojure/clojure` version `1.5.0`. It is
686 still compatible with Clojure 1.3 and if your `project.clj` depends on
687 a different version, it will be used, but 1.5 is the default now.
688
689 We encourage all users to upgrade to 1.5, it is a drop-in replacement
690 for the majority of projects out there.
691
692
d623de5 Make langohr.consumers/subscribe support old and new style options
Michael Klishin authored
693 ## Changes between Langohr 1.0.0-beta12 and 1.0.0-beta13
694
695 `1.0.0-beta13` has **BREAKING CHANGES**:
696
697 ### langohr.consumers/subscribe Options Renamed
698
699 The options `langohr.consumers/subscribe` takes now have consistent naming:
700
ea079bb Change log corrections
Michael Klishin authored
701 * `:handle-consume-ok` becomes `:handle-consume-ok-fn`
702 * `:handle-cancel` becomes `:handle-cancel-fn`
703 * `:handle-cancel-ok` becomes `:handle-cancel-ok-fn`
704 * `:handle-shutdown-signal-ok` becomes `:handle-shutdown-signal-ok-fn`
705 * `:handle-recover-ok` becomes `:handle-recover-ok-fn`
d623de5 Make langohr.consumers/subscribe support old and new style options
Michael Klishin authored
706 * `:handle-delivery-fn` does not change
707
708 This makes handler argument names consistent across the board.
709
710 Previous options (`:handle-cancel`, etc) are still supported
711 for backwards compatibility but will eventually be removed.
712
3a9f49e Change log update
Michael Klishin authored
713 ## Changes between Langohr 1.0.0-beta11 and 1.0.0-beta12
714
5054645 Change log updates
Michael Klishin authored
715 ### Clojure-friendly Return Values
716
717 Previously functions such as `langohr.queue/declare` returned the underlying
718 RabbitMQ Java client responses. In case a piece of information from the
719 response was needed (e.g. to get the queue name that was generated by
720 RabbitMQ), the only way to obtain it was via the Java interop.
721
722 This means developers had to learn about how the Java client works.
723 Such responses are also needlessly unconvenient when inspecting them
724 in the REPL.
725
726 Langohr `1.0.0-beta12` makes this much better by returning a data structure
727 that behaves like a regular immutable Clojure map but also provides the same
728 Java interoperability methods for backwards compatibility.
729
730 For example, `langohr.queue/declare` now returns a value that is a map
731 but also provides the same `.getQueue` method you previously had to use.
732
733 Since the responses implement all the Clojure map interfaces, it is possible to use
734 destructuring on them:
735
736 ``` clojure
737 (require '[langohr.core :as lhc])
738 (require '[langohr.queue :as lhq])
739
740 (let [conn (lhc/connect)
741 channel (lhc/create-channel conn)
742 {:keys [queue] :as declare-ok} (lhq/declare channel "" :exclusive true)]
743 (println "Response: " declare-ok)
744 (println (format "Declared a queue named %s" queue)))
745 ```
746
747 will output
748
749 ```
750 Response: {:queue amq.gen-G9bmz19UjHLBjyxhanOG3Q, :consumer-count 0, :message_count 0, :consumer_count 0, :message-count 0}
751 Declared a queue named amq.gen-G9bmz19UjHLBjyxhanOG3Q
752 ```
753
754 ### langohr.confirm/add-listener Now Returns Channel
755
756 `langohr.confirm/add-listener` now returns the channel instead of the listener. This way
757 it is more useful with the threading macro (`->`) that threads channels (a much more
758 common use case).
759
760 ### langohr.exchange/unbind
761
762 `langohr.exchage/unbind` was missing in earlier releases and now added.
763
764 ### langohr.core/closed?
765
766 `langohr.core/closed?` is a new function that complements `langohr.core/open?`.
767
768 ### langohr.queue/declare-server-named
769
770 `langohr.queue/declare-server-named` is a new convenience function
771 that declares a server-named queue and returns the name RabbitMQ
772 generated:
773
774 ``` clojure
775 (require '[langohr.core :as lhc])
776 (require '[langohr.queue :as lhq])
777
778 (let [conn (lhc/connect)
779 channel (lhc/create-channel conn)
780 queue (lhq/declare-server-named channel)]
781 (println (format "Declared a queue named %s" queue))
782 ```
783
4dca130 Change log update
Michael Klishin authored
784 ### More Convenient TLS Support
785
786 Langohr will now correct the port to TLS/SSL if provided `:port` is
787 `5672` (default non-TLS port) and `:ssl` is set to `true`.
3a9f49e Change log update
Michael Klishin authored
788
789
790
6b27c54 @michaelklishin Introduce langohr.exchange/declare-passive
authored
791 ## Changes between Langohr 1.0.0-beta10 and 1.0.0-beta11
792
082d685 Mention HTTP API client in the change log
Michael Klishin authored
793 ### HTTP API Client
794
795 Langohr `1.0.0-beta11` features initial bits of RabbitMQ HTTP API client
796 under `langohr.http`.
797
798
4b3da89 Automatically enable TLS if provided port is 5671
Michael Klishin authored
799 ### More Convenient TLS Support
800
801 Langohr will now automatically enable TLS/SSL if provided `:port` is
802 `5671`.
803
804
6a56a82 RabbitMQ Java client 3.0.2
Michael Klishin authored
805 ### RabbitMQ Java Client 3.0.x
806
807 RabbitMQ Java Client has been upgraded to version `3.0.2`.
808
809
6b27c54 @michaelklishin Introduce langohr.exchange/declare-passive
authored
810 ### langohr.exchange/declare-passive
811
812 `langohr.exchange/declare-passive` is a new function that performs passive
813 exchange declaration (checks if an exchange exists).
814
815 An example to demonstrate:
816
817 ``` clojure
818 (require '[langohr.channel :as lch])
819 (require '[langohr.exchange :as le])
820
821 (let [ch (lch/open conn)]
822 (le/declare-passive ch "an.exchange"))
823 ```
824
6043847 Correct change log
Michael Klishin authored
825 If the exchange does exist, the function has no effect. If not,
6b27c54 @michaelklishin Introduce langohr.exchange/declare-passive
authored
826 an exception (`com.rabbitmq.client.ShutdownSignalException`, `java.io.IOException`) will be thrown.
827
828
3caf1b4 @michaelklishin Update change log
authored
829 ## Changes between Langohr 1.0.0-beta9 and 1.0.0-beta10
830
831 ### langohr.basic/reject now correctly uses basic.reject
832
833 langohr.basic/reject now correctly uses `basic.reject` AMQP method
834 and not `basic.ack`.
835
836 Contributed by @natedev.
837
838
839
4f7a3fe @michaelklishin Make sure return listeners receive message body as is
authored
840 ## Changes between Langohr 1.0.0-beta8 and 1.0.0-beta9
841
842 `1.0.0-beta9` has **BREAKING CHANGES**:
843
844 ### Return Handlers Body Now Passed as-is
845
846 Langohr no longer instantiates a string from the message body before passing it to
847 return listeners. The body will be passed as is, as an array of bytes.
848
849
850
851
fdfabda @michaelklishin BREAKING CHANGE: Make langohr.basic/get return value consistent with wha...
authored
852 ## Changes between Langohr 1.0.0-beta7 and 1.0.0-beta8
853
854 `1.0.0-beta8` has **BREAKING CHANGES**:
855
856 ### langohr.basic/get Return Value Change
857
858 `langohr.basic/get` now returns a pair of `[metadata payload]` to be consistent with what
859 delivery handler functions accept:
860
861 ``` clojure
862 (require '[langohr.basic :as lhb])
863
864 (let [[metadata payload] (lhb/get channel queue)]
865 (println metadata)
866 (println (String. ^bytes payload)))
867 ```
868
869
88e05c5 @michaelklishin Minor change log update
authored
870 ## Changes between Langohr 1.0.0-beta6 and 1.0.0-beta7
871
5b8f72c @michaelklishin Breaking change: unify consumer handler names
authored
872 `1.0.0-beta7` has **BREAKING CHANGES**:
873
874 ### langohr.basic/consume Handler Names
875
2b0c0cd @michaelklishin Change log corrections
authored
876 The options `langohr.consumers/create-default` takes now have consistent naming:
5b8f72c @michaelklishin Breaking change: unify consumer handler names
authored
877
878 * `:consume-ok-fn` becomes `:handle-consume-ok-fn`
879 * `:cancel-fn` becomes `:handle-cancel-fn`
880 * `:cancel-ok-fn` becomes `:handle-cancel-ok-fn`
881 * `:shutdown-signal-ok-fn` becomes `:handle-shutdown-signal-ok-fn`
882 * `:recover-ok-fn` becomes `:handle-recover-ok-fn`
883 * `:handle-delivery-fn` does not change
884
885 This makes handler argument names consistent across the board.
88e05c5 @michaelklishin Minor change log update
authored
886
887
4585f2d @michaelklishin Breaking change: make delivery handler signatures consistent everywhere
authored
888 ## Changes between Langohr 1.0.0-beta5 and 1.0.0-beta6
889
890 `1.0.0-beta6` has **BREAKING CHANGES**:
891
2b0c0cd @michaelklishin Change log corrections
authored
892 ### langohr.consumes/create-default Delivery Handler Signature Change
4585f2d @michaelklishin Breaking change: make delivery handler signatures consistent everywhere
authored
893
2b0c0cd @michaelklishin Change log corrections
authored
894 `langohr.consumers/create-default`'s `:handle-delivery-fn` signature is now consistent with
4585f2d @michaelklishin Breaking change: make delivery handler signatures consistent everywhere
authored
895 that of `langohr.basic/subscribe`:
896
897 ``` clojure
898 (fn [^Channel ch metadata ^bytes payload]
899 )
900 ```
901
88e05c5 @michaelklishin Minor change log update
authored
902 This makes delivery handler signatures consistent across the board.
4585f2d @michaelklishin Breaking change: make delivery handler signatures consistent everywhere
authored
903
904
905
53149dd @michaelklishin Back to SNAPSHOT
authored
906 ## Changes between Langohr 1.0.0-beta4 and 1.0.0-beta5
907
1cf3651 @michaelklishin Support "advanced" connection factory settings
authored
908 ### More Connection Settings
909
910 `langohr.core/connect` now supports several more options:
911
912 * `:ssl` (true or false): when true, Langohr will use the default SSL protocol (SSLv3) and the default (trusting) trust manager
913 * `:ssl-context` (`javax.net.ssl.SSLContext`): SSL context to use to create connection factory
914 * `:sasl-config` (`com.rabbitmq.client.SaslConfig`): use if you need to use a custom SASL config
915 * `:socket-factory` (`javax.net.SocketFactory`): use if you need to use a custom socket factory
916
917
d7b3b13 @michaelklishin Update change log
authored
918 ### Client Capabilities
919
920 Langohr now provides its capabilities to the broker so it's possible to tell the difference between
921 Langohr and the RabbitMQ Java client in the RabbitMQ Management UI connection information.
922
ba1d270 @michaelklishin Update change log
authored
923 ### Broker Capabilities Introspection
924
925 `langohr.core/capabilities-of` is a new function that returns broker capabilities as an immutable map,
926 e.g.
927
928 ``` clojure
929 {:exchange_exchange_bindings true
930 :consumer_cancel_notify true
931 :basic.nack true
932 :publisher_confirms true}
933 ```
934
066f76d @michaelklishin Clojure 1.4 is the new default
authored
935 ### Clojure 1.4 By Default
936
937 Langohr now depends on `org.clojure/clojure` version `1.4.0`. It is still compatible with Clojure 1.3 and if your `project.clj` depends
938 on 1.3, it will be used, but 1.4 is the default now.
939
940 We encourage all users to upgrade to 1.4, it is a drop-in replacement for the majority of projects out there.
941
53149dd @michaelklishin Back to SNAPSHOT
authored
942
943
caba792 @michaelklishin 1.0.0-beta3
authored
944 ## Changes between Langohr 1.0.0-beta3 and 1.0.0-beta4
945
909f99a @michaelklishin Change log update
authored
946 ### Payload is Now Longer Assumed to Be a String
947
948 `langohr.basic/publish` no longer assumes the payload is always a string. It can be anything the `langohr.conversion/BytePayload`
949 protocol is implemented for, by default byte arrays and strings.
950
2d0767d @michaelklishin Change langohr.queue/declare defaults: :exclusive is now false by defaul...
authored
951 ### queue.declare :exclusive Default Value Change
952
953 `langohr.queue/declare` now uses default value for the `:exclusive` parameter as `false`. The reason for
954 this is that exclusive queues are deleted when connection that created them is closed. This caused
955 confusion w.r.t. non-auto-deleted queues being deleted in such cases.
caba792 @michaelklishin 1.0.0-beta3
authored
956
957
958
51cb34b @michaelklishin Begin beta3 iteration
authored
959 ## Changes between Langohr 1.0.0-beta2 and 1.0.0-beta3
960
caba792 @michaelklishin 1.0.0-beta3
authored
961 ### URI parsing
962
963 `langohr.core/settings-from` is a new public API function that parses AMQP and AMQPS connection URIs
964 and returns an immutable map of individual arguments. URI parsing is now delegated to the Java client
965 for consistency.
966
967
836a3c6 @michaelklishin Bump RabbitMQ Java client to 2.8.6
authored
968 ### RabbitMQ Java Client 2.8.6
803e2ca @michaelklishin RabbitMQ Java client 2.8.2
authored
969
836a3c6 @michaelklishin Bump RabbitMQ Java client to 2.8.6
authored
970 RabbitMQ Java Client has been upgraded to version 2.8.6.
51cb34b @michaelklishin Begin beta3 iteration
authored
971
972
c367bc1 @michaelklishin Migrate to Leiningen 2
authored
973 ## Changes between Langohr 1.0.0-beta1 and 1.0.0-beta2
974
ebd0f4c @michaelklishin Change message consumer fn signature per discussion in #3
authored
975 ### Breaking change: message handler signature has changed
976
977 Previously message handlers registered via `langohr.consumers/subscribe` had the following
978 signature:
979
980 ``` clojure
981 (fn [^QueueingConsumer$Delivery delivery ^AMQP$BasicProperties properties payload] ...)
982 ```
983
984 starting with beta2, it has changed to be more Clojure friendly
985
986 ``` clojure
987 (fn [^Channel ch metadata payload] ...)
988 ```
989
990 All message metadata (both envelope and message properties) are now passed in as a single Clojure
991 map that you can use destructuring on:
992
993 ``` clojure
994 (fn [^Channel ch {:keys [type content-type message-id correlation-id] :as metadata} payload] ...)
995 ```
996
997 In addition, in explicit acknowledgement mode, ack-ing and nack-ing messages got easier because
998 consumer channel is now passed in.
999
1000 It is important to remember that sharing channels between threads that publish messages is **dangerous**
1001 and should be avoided. Ack-ing, nack-ing and consuming messages with shared channels is usually acceptable.
1002
1003
1004
741fd22 @michaelklishin Upgrade to RabbitMQ Java client 2.8.x
authored
1005 ### RabbitMQ Java Client 2.8.x
1006
1007 RabbitMQ Java Client which Langohr is based on has been upgraded to version 2.8.1.
1008
c367bc1 @michaelklishin Migrate to Leiningen 2
authored
1009 ### Leiningen 2
1010
1011 Langohr now uses [Leiningen 2](https://github.com/technomancy/leiningen/wiki/Upgrading).
Something went wrong with that request. Please try again.