- 
    Task 
- 
    Resolution: Unresolved
- 
    Normal 
- 
    None
- 
    None
- 
    None
- 
        3
- 
        False
- 
        
- 
        False
- 
        subs-swatch-lightning
- 
        
- 
        
Add the unleash dependency to the notifications service:
<dependency>
      <groupId>io.quarkiverse.unleash</groupId>
      <artifactId>quarkus-unleash</artifactId>
</dependency>
Add the following properties to the notifications service:
# Disable the service in the test environment so that we can # mock the service. %test.quarkus.unleash.active=false quarkus.unleash.devservices.enabled=${ENABLE_UNLEASH_DEV_SERVICES:false} quarkus.unleash.url=${UNLEASH_URL:http://localhost:4242/api} quarkus.unleash.token=${UNLEASH_API_TOKEN:default:development.unleash-insecure-api-token} quarkus.unleash.name-prefix=swatch %dev.quarkus.unleash.fetch-toggles-interval=1 %ephemeral.quarkus.unleash.fetch-toggles-interval=1
Create FeatureFlags class in package com.redhat.swatch.notifications.services:
@Slf4j @ApplicationScoped public class FeatureFlags { public static final String SEND_NOTIFICATIONS = "swatch.swatch-notifications.send-notifications"; private final Unleash unleash; public FeatureFlags(Unleash unleash) { this.unleash = unleash; } public boolean sendNotifications() { return unleash.isEnabled(FeatureFlags.SEND_NOTIFICATIONS); } }
Acceptance Criteria:
- Unleash feature flag is implemented.
- Flag name "swatch.swatch-notifications.send-notifications"
- Update clowdapp as necessary
- Ensure feature flag is honored in EE as well as stage & prod
- is blocked by
- 
                    SWATCH-3792 Create skeleton for swatch-utilization service -         
- Release Pending
 
-         
- is depended on by
- 
                    SWATCH-3795 Send notifications to “platform.notifications.ingress” -         
- Backlog
 
-         
- relates to
- 
                    SWATCH-2924 Implement Unleash Flag for swatch Event message producer -         
- Closed
 
-