Questions tagged [unsubscribe]
215 questions
3
votes
1 answer
Is it necessary to unsubscribe/complete in a backend service to prevent side effects?
There has been a lot discussion about when and how to unsubscribe and that subscriptions shouldn't leak outside of a service. I have read many articles about this matter and I think I understood some parts, but what I'm missing in the writeups and…

jowey
- 7,581
- 6
- 27
- 46
3
votes
2 answers
Are returned BehaviourSubjects (as Observable) effected by take(1) or unsubscribe?
If I return a BehaviorSubject as an Observable from a service and subscribe to that Observable in a component and then call either take(1) or unsubscribe, does the BehaviorSubject keep emitting values? Is it effected?
Edit
Thank you everyone for the…

cyberguy
- 233
- 3
- 10
3
votes
3 answers
rxjs - stop observable with a subject subscription
I created an Observable generating potentially infinite amount of data (e.g. a timer). This data is accessed through a subject, so multiple observers would receive the same values.
How to stop the Observable generating new values? (without modifying…

nagy.zsolt.hun
- 6,292
- 12
- 56
- 95
3
votes
1 answer
Angular2 : Should Host listeners be unsubscibed? How does Host Listner work? If I do not have to unsubscribe, When does it get unsubscribed?
@HostListener('window:scroll', ['$event'])
onScroll(event) {
// Do something
}
I have been listening to scroll events in many components. And I am not unsubscribing. Does it cause a problem.

Shilpa J
- 41
- 6
3
votes
0 answers
RxJS switchMap does not cancel inner merged observable
The inner merged observable isn't terminating with this code (rxjs 5.5.6):
let source = new Subject();
// when the source emits a vector of strings, output
// each string with a 1s delay
source.switchMap(v =>…

kayjtea
- 2,979
- 1
- 20
- 19
3
votes
2 answers
Sparkpost unsubscribe and webhook
I have a problem with unsubscribe link in newsletter and can't figure out what I'm doing wrong.
The link in the newsletter is Unsubscribe".
I have…

praxus
- 488
- 1
- 7
- 18
3
votes
2 answers
*|UNSUB|* does not get parsed in mandrill template
I am using *|UNSUB|* merge tag in the mandrill template, which I expect to automatically parse it when the mail is sent using this template (without doing anything in the code). My template code is,

KayKay
- 553
- 7
- 22
3
votes
1 answer
Proper way to implement unsubscribe function
I'm currently using PHPMailer to send out an email to a mailing list, however I am looking to create an unsubscribe function because I cannot in good conscience not give the option.
The only problem I'm facing is doing it in a safe manner. What…

Marcelo
- 157
- 9
3
votes
1 answer
Is there any way to unsubscribe from all the parse channel in one call in Android
I am developing an android app In that everything is working fine. I just want to ask that is there any way to unsubscribe from all the parse channel in one call instead of using :
ParsePush.unsubscribeInBackground("channel1");
checked on google…

Vishal
- 33
- 4
3
votes
0 answers
Mailgun Unsubscribe URL for Campaign
Through the Mailgun Documentation, there are 3 unsubscribe links:
%unsubscribe_url% link to unsubscribe recipient from all messages sent by given domain
%tag_unsubscribe_url% link to unsubscribe from all tags provided in the message
…

nitsujri
- 1,448
- 2
- 16
- 29
3
votes
3 answers
Unsubscribe option in Email using C#
I have been sending email from C# and they are working fine, but now I am also looking for the functionality to allow receiver to unsubscribe.
I am unable to get how to proceed as I have no idea.
I googled enough so need some hint.
Below is my…

Incredible
- 3,495
- 8
- 49
- 77
2
votes
1 answer
Should I unsubscribe from observable defined in component?
I have an Angular component with observable (BehaviourSubject) set as a class member.
At some point I subscribe to it.
The question is: should I unsubscribe from it in ngOnDestroy() or not?
It's unclear since the lifetime of observable seems to be…

kirschpirogge
- 357
- 4
- 12
2
votes
0 answers
Firestore listeners won't unsubscribe - VUE JS 3
//Environment:
//Vue 3
//Vite
//Firebase V9
//Pinia** (For state management)
Hi!, I'm just trying to unsubscribe from firestore listeners from from Pinia Actions... for this matter I'll give a brief example of how is it set it up.
So first in my…

NaturalDevCR
- 803
- 1
- 11
- 34
2
votes
1 answer
Unsubscribe later with takeUntil if a condition is met
I want to unsubscribe to an observable with takeUntil in any case where the number does not equal 5.
If the number is 5 want to do something and unsubscribe later, but it does not work.
This is my stackblitz link:…

nfianfnuae
- 21
- 2
2
votes
0 answers
Should you unsubscribe from an event in an Angular Service?
We have several Angular services that subscribe to an event in the constructor. We are trying to determine whether it's necessary to unsubscribe from the event in the ngOnDestroy() method. Here's an example of the code:
import { Injectable,…

JimP
- 75
- 7