@@ -33,6 +33,14 @@ JMS configurations can be done either entirely in the Logstash configuration fil
33
33
configurations, should also use the combination of yaml file and Logstash configuration.
34
34
35
35
36
+ [id="plugins-{type}s-{plugin}-ecs"]
37
+ ==== Compatibility with the Elastic Common Schema (ECS)
38
+
39
+ JMS data is application specific. ECS compliance for fields depends on the use case.
40
+ The plugin includes sensible defaults that change based on <<plugins-{type}s-{plugin}-ecs_compatibility,ECS compatibility mode>>.
41
+ When ECS compatibility is disabled, headers, properties, and payload are targeted at the root level of the event to maintain compatibility with legacy usage of this plugin.
42
+ When targeting an ECS version, headers and properties target `@metadata` sub-fields unless configured otherwise in order to avoid conflict with ECS fields.
43
+ See <<plugins-{type}s-{plugin}-headers_target>>, <<plugins-{type}s-{plugin}-properties_target>> and <<plugins-{type}s-{plugin}-target>>.
36
44
37
45
==== Sample Configuration using Logstash Configuration Only
38
46
@@ -60,7 +68,7 @@ The JMS plugin can also be configured using JNDI if desired.
60
68
truststore => '/Users/logstash-user/security/truststore.jks'
61
69
truststore_password => 'yet_another_secret'
62
70
# Parts of the JMS message to be included <8>
63
- include_header => false
71
+ include_headers => false
64
72
include_properties => false
65
73
include_body => true
66
74
# Message selector
@@ -98,7 +106,7 @@ The JMS plugin can also be configured using JNDI if desired.
98
106
input {
99
107
jms {
100
108
# Logstash Configuration Settings. <1>
101
- include_header => false
109
+ include_headers => false
102
110
include_properties => false
103
111
include_body => true
104
112
use_jms_timestamp => false
@@ -144,7 +152,7 @@ This section contains sample configurations for connecting to a JMS provider tha
144
152
input {
145
153
jms {
146
154
# Logstash Configuration File Settings <1>
147
- include_header => false
155
+ include_headers => false
148
156
include_properties => false
149
157
include_body => true
150
158
use_jms_timestamp => false
@@ -205,7 +213,7 @@ This section contains sample configurations for connecting to a JMS provider tha
205
213
input {
206
214
jms {
207
215
# Logstash specific configuration settings <1>
208
- include_header => false
216
+ include_headers => false
209
217
include_properties => false
210
218
include_body => true
211
219
use_jms_timestamp => false
@@ -379,10 +387,13 @@ This plugin supports the following configuration options plus the <<plugins-{typ
379
387
| <<plugins-{type}s-{plugin}-durable_subscriber>> |<<boolean,boolean>>|No
380
388
| <<plugins-{type}s-{plugin}-durable_subscriber_client_id>> |<<string,string>>|No
381
389
| <<plugins-{type}s-{plugin}-durable_subscriber_name>> |<<string,string>>|No
390
+ | <<plugins-{type}s-{plugin}-ecs_compatibility>> |<<string,string>>|No
382
391
| <<plugins-{type}s-{plugin}-factory>> |<<string,string>>|No
383
392
| <<plugins-{type}s-{plugin}-factory_settings>> |<<hash,hash>>|No
393
+ | <<plugins-{type}s-{plugin}-headers_target>> |<<string,string>>|No
384
394
| <<plugins-{type}s-{plugin}-include_body>> |<<boolean,boolean>>|No
385
395
| <<plugins-{type}s-{plugin}-include_header>> |<<boolean,boolean>>|No
396
+ | <<plugins-{type}s-{plugin}-include_headers>> |<<boolean,boolean>>|No
386
397
| <<plugins-{type}s-{plugin}-include_properties>> |<<boolean,boolean>>|No
387
398
| <<plugins-{type}s-{plugin}-interval>> |<<number,number>>|No
388
399
| <<plugins-{type}s-{plugin}-jndi_context>> |<<hash,hash>>|No
@@ -391,13 +402,15 @@ This plugin supports the following configuration options plus the <<plugins-{typ
391
402
| <<plugins-{type}s-{plugin}-keystore_password>> |<<password,password>>|No
392
403
| <<plugins-{type}s-{plugin}-oracle_aq_buffered_messages>> |<<boolean,boolean>>|No
393
404
| <<plugins-{type}s-{plugin}-password>> |<<string,string>>|No
405
+ | <<plugins-{type}s-{plugin}-properties_target>> |<<string,string>>|No
394
406
| <<plugins-{type}s-{plugin}-pub_sub>> |<<boolean,boolean>>|No
395
407
| <<plugins-{type}s-{plugin}-require_jars>> |<<array,array>>|No
396
408
| <<plugins-{type}s-{plugin}-runner>> |<<string,string>>|__Deprecated__
397
409
| <<plugins-{type}s-{plugin}-selector>> |<<string,string>>|No
398
410
| <<plugins-{type}s-{plugin}-skip_headers>> |<<array,array>>|No
399
411
| <<plugins-{type}s-{plugin}-skip_properties>> |<<array,array>>|No
400
412
| <<plugins-{type}s-{plugin}-system_properties>> |<<hash,hash>>|No
413
+ | <<plugins-{type}s-{plugin}-target>> |<<string,string>>|No
401
414
| <<plugins-{type}s-{plugin}-threads>> |<<number,number>>|No
402
415
| <<plugins-{type}s-{plugin}-timeout>> |<<number,number>>|No
403
416
| <<plugins-{type}s-{plugin}-truststore>> |a valid filesystem path|No
@@ -468,6 +481,21 @@ This represents the value of the client ID for a durable subscribtion, and is on
468
481
This represents the value of the subscriber name for a durable subscribtion, and is only used if `durable_subscriber`
469
482
is set to `true`. Please consult your JMS Provider documentation for constraints and requirements for this setting.
470
483
484
+ [id="plugins-{type}s-{plugin}-ecs_compatibility"]
485
+ ===== `ecs_compatibility`
486
+
487
+ * Value type is <<string,string>>
488
+ * Supported values are:
489
+ ** `disabled`: does not use ECS-compatible field names (fields might be set at the root of the event)
490
+ ** `v1`, `v8`: avoids field names that might conflict with Elastic Common Schema (for example, JMS specific properties)
491
+ * Default value depends on which version of Logstash is running:
492
+ ** When Logstash provides a `pipeline.ecs_compatibility` setting, its value is used as the default
493
+ ** Otherwise, the default value is `disabled`.
494
+
495
+ Controls this plugin's compatibility with the {ecs-ref}[Elastic Common Schema (ECS)].
496
+ The value of this setting affects the _default_ value of <<plugins-{type}s-{plugin}-headers_target>> and
497
+ <<plugins-{type}s-{plugin}-properties_target>>.
498
+
471
499
[id="plugins-{type}s-{plugin}-factory"]
472
500
===== `factory`
473
501
@@ -488,36 +516,71 @@ Hash of implementation specific configuration values to set on the connection fa
488
516
`exclusive_consumer => true` would call `setExclusiveConsumer(true)` on the supplied connection factory.
489
517
See your JMS provider documentation for implementation specific details.
490
518
519
+ [id="plugins-{type}s-{plugin}-headers_target"]
520
+ ===== `headers_target`
521
+
522
+ * Value type is <<string,string>>
523
+ * Default value depends on whether <<plugins-{type}s-{plugin}-ecs_compatibility>> is enabled:
524
+ ** ECS Compatibility disabled: no default value for this setting
525
+ ** ECS Compatibility enabled: `"[@metadata][input][jms][headers]"
526
+
527
+ The name of the field under which JMS headers will be added, if <<plugins-{type}s-{plugin}-include_headers>> is set.
528
+
491
529
[id="plugins-{type}s-{plugin}-include_body"]
492
530
===== `include_body`
493
531
494
532
* Value type is <<boolean,boolean>>
495
533
* Default value is `true`
496
534
497
535
Include JMS Message Body in the event.
498
- Supports TextMessage, MapMessage and ByteMessage .
536
+ Supports TextMessage, MapMessage and BytesMessage .
499
537
500
- If the JMS Message is a TextMessage or ByteMessage , then the value will be in
538
+ If the JMS Message is a TextMessage or BytesMessage , then the value will be in
501
539
the "message" field of the event. If the JMS Message is a MapMessage, then all
502
- the key/value pairs will be added in the Hashmap of the event.
540
+ the key/value pairs will be added at the top-level of the event by default.
541
+ To avoid pollution of the top-level namespace, when receiving a MapMessage, use the <<plugins-{type}s-{plugin}-target>>.
503
542
504
543
StreamMessage and ObjectMessage are not supported.
505
544
506
545
[id="plugins-{type}s-{plugin}-include_header"]
507
546
===== `include_header`
508
547
548
+ * Value type is <<boolean,boolean>>
549
+ * This option is deprecated
550
+
551
+ Note: This option is deprecated and it will be removed in the next major version of Logstash.
552
+ Use `include_headers` instead.
553
+
554
+ [id="plugins-{type}s-{plugin}-include_headers"]
555
+ ===== `include_headers`
556
+
509
557
* Value type is <<boolean,boolean>>
510
558
* Default value is `true`
511
559
512
560
A JMS message has three parts:
513
561
514
- * Message Headers (required)
515
- * Message Properties (optional)
516
- * Message Bodies (optional)
562
+ * Message Headers (required)
563
+ * Message Properties (optional)
564
+ * Message Body (optional)
517
565
518
566
You can tell the input plugin which parts should be included in the event produced by Logstash.
519
567
520
- Include JMS Message Header Field values in the event.
568
+ Include standard JMS message header field values in the event.
569
+ Example headers:
570
+ [source,ruby]
571
+ -----
572
+ {
573
+ "jms_message_id" => "ID:amqhost-39547-1636977297920-71:1:1:1:1",
574
+ "jms_timestamp" => 1636977329102,
575
+ "jms_expiration" => 0,
576
+ "jms_delivery_mode" => "persistent",
577
+ "jms_redelivered" => false,
578
+ "jms_destination" => "topic://41ad5342149901ad",
579
+ "jms_priority" => 4,
580
+ "jms_type" => "sample",
581
+ "jms_correlation_id" => "28d975cb-14ff-4285-841e-05ef1e0a7ab2"
582
+ }
583
+ -----
521
584
522
585
[id="plugins-{type}s-{plugin}-include_properties"]
523
586
===== `include_properties`
@@ -590,6 +653,16 @@ Only for use with Oracle AQ
590
653
591
654
Password to use when connecting to the JMS provider.
592
655
656
+ [id="plugins-{type}s-{plugin}-properties_target"]
657
+ ===== `properties_target`
658
+
659
+ * Value type is <<string,string>>
660
+ * Default value depends on whether <<plugins-{type}s-{plugin}-ecs_compatibility>> is enabled:
661
+ ** ECS Compatibility disabled: no default value for this setting
662
+ ** ECS Compatibility enabled: `"[@metadata][input][jms][properties]"
663
+
664
+ The name of the field under which JMS properties will be added, if <<plugins-{type}s-{plugin}-include_properties>> is set.
665
+
593
666
[id="plugins-{type}s-{plugin}-pub_sub"]
594
667
===== `pub_sub`
595
668
@@ -650,14 +723,25 @@ If `include_properties` is set, a list of properties to skip processing on can b
650
723
651
724
Any System properties that the JMS provider requires can be set either in a Hash here, or in `jvm.options`
652
725
726
+ [id="plugins-{type}s-{plugin}-target"]
727
+ ===== `target`
728
+
729
+ * Value type is <<string,string>>
730
+ * There is no default value for this setting.
731
+
732
+ The name of the field to assign MapMessage data into.
733
+ If not specified data will be stored in the root of the event.
734
+
735
+ NOTE: For TextMessage and BytesMessage the `target` has no effect. Use the codec setting instead
736
+ e.g. `codec => json { target => "[jms]" }`.
653
737
654
738
[id="plugins-{type}s-{plugin}-threads"]
655
739
===== `threads`
656
740
657
741
* Value type is <<number,number>>
658
742
* Default value is `1`
659
743
660
- * Note that if pub_sub is set to true, this value *must* be 1 . A configuration error will be thrown otherwise
744
+ NOTE: If pub_sub is set to ` true` , this value *must* be `1` . A configuration error will be thrown otherwise!
661
745
662
746
[id="plugins-{type}s-{plugin}-timeout"]
663
747
===== `timeout`
0 commit comments