[id='jgroups_stackcombine-{context}']
= Stack Combine Attribute

`stack.combine` modifies inherited JGroups properties.

`stack.position` identifies protocols to modify. If you do not specify
`stack.position`, {brandname} defaults to the same protocol as the inherited
configuration, which resets all non-specified attributes to the default values.

[%header,cols="1,2"]
|===

| Value
| Description

| `COMBINE`
| Overrides existing protocol attributes.

| `REPLACE`
| Replaces existing protocols.

| `INSERT_AFTER`
| Inserts protocols into the JGroups stack.

| `REMOVE`
| Removes protocols from the inherited configuration.

|===

For example, evaluate a Gossip router for cluster discovery using a TCP stack
configuration named "prod":

[source,xml,options="nowrap",subs=attributes+]
----
include::config_examples/config_jgroups_extends.xml[]
----

<1> creates a new stack named "gossip-prod" that inherits from "prod".
<2> uses `TCPGOSSIP` discovery instead of `MPING`.
<3> removes `FD_SOCK` from the "gossip-prod" stack.
<4> increases the `VERIFY_SUSPECT` timeout.
<5> adds `SYM_ENCRYPT` for cluster security to the stack after the `pbcast.NAKACK2` protocol.
